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

Test and document what happens when a component element is defined as ref twice #71

Open
ThaNarie opened this issue Mar 2, 2022 · 1 comment
Assignees
Labels
Documentation Improvements or additions to documentation

Comments

@ThaNarie
Copy link
Contributor

ThaNarie commented Mar 2, 2022

Most "common" use case for this scenario is when an element needs controlling from its parent and grandparent (mostly when dealing with wrappers).
In that case, a grandparent will also select the grandchild component (setting ignoreGuard to true in refComponent(s)), and potentially add bindings to it.

Need to test:

  • if the component is only initialised once
  • if both refs share the same component instance
  • what happens when using bindings from both places that DON'T overlap
  • what happens when using bindings from both places that DO overlap

And more advanced:

  • what happens with component collections, that maybe partly overlap between parents and children
@ThaNarie ThaNarie changed the title Test and document what happens when an element is defined as `ref twice Test and document what happens when a component element is defined as ref twice Mar 2, 2022
@ThaNarie ThaNarie added the Documentation Improvements or additions to documentation label Mar 2, 2022
@ThaNarie
Copy link
Contributor Author

@jspolancor You could already prepare test cases (maybe first as stories if that's easier?) so we can see what happens, and continue to think about potential solutions from there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants