Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v3): create independent instances of every component using a component key prop #315

Conversation

diegoazh
Copy link
Owner

We added a key prop to every component to create independent instances for every one of them and we use a default key if you do not want to set the key and only use one instance of every component.

Solve: #309

…ponent key

We added a key to every component to create independent instances for everyone and a default key if you only use one instance of every component and do not want to set the key.

Solve: #309
@diegoazh diegoazh added the fix label Apr 11, 2024
@diegoazh diegoazh self-assigned this Apr 11, 2024
@diegoazh diegoazh merged commit 0c21c60 into master Apr 11, 2024
12 checks passed
@diegoazh diegoazh deleted the issue-309-Bug_Does_not_work_with_multiple_maps_on_the_same_page branch April 11, 2024 17:16
github-actions bot pushed a commit that referenced this pull request Apr 11, 2024
# [2.1.0](gmv3_v2.0.1...gmv3_v2.1.0) (2024-04-11)

### Features

* **v3:** create independent instances of every component using a component key prop ([#315](#315)) ([0c21c60](0c21c60)), closes [#309](#309) [#309](#309) [#309](#309)
@diegoazh
Copy link
Owner Author

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Comment on lines +78 to +79
// map.value = await mapPromise;
// ready.value = true;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these comments.

Comment on lines +24 to +25
const componentPromisesList = new Map();
/**
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line between these two lines.

Comment on lines +578 to +579
let ancestor = currentInstance?.parent;
let name = ancestor?.type.name || ancestor?.type.__name;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse this in a function.

Comment on lines +582 to +583
ancestor = ancestor.parent;
name = ancestor?.type.name || ancestor?.type.__name;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse this in a function.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix this file to use the new features correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant