Subtree lifecycle hooks
- Dominant language
- Elixir
- Stars
- 119
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
In order to support things like stateful components or to support `phx-update`/temporary assigns on top of managed data structures, we need the ability to support subtree lifecycle hooks.
This would enable us to run custom code for the following events:
* A subtree has been created
* A subtree has changed
* A subtree has been destroyed
For stateful components, the mapping would be as follows:
* Subtree created -> create the stateful component
* Subtree changed -> rerender the stateful component
* Subtree destroyed -> destroy the stateful component
Likewise, for `phx-update`/temporary assigns:
* Subtree created -> create the managed data structure
* Subtree changed -> perform append/prepend to the `ClientList`
* Subtree destroyed -> destroy the managed data structure
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.