Message from JavaScript discussions

November 2016

— I am rolling my own and ran into an issue with ControllerViews


If a ControllerView takes over the DOM (deletes contents and replaces with it's own components), the older components of the previous ControllerView still keep state in the background. The next time you go to load that older set of components, and the data is the same, they won't render (per the "dont render if the data doesn't change" rule)

— I can think of a few solutions, some good, some icky. How do you deal with it?

— Some stuff like:
Keep 1 variable that lists the last controllerview to use the DOM
or wipe state of all components in non-presenting views,
or delete those components and only create them when needed.

Currently on first init all controllerviews and their components are in memory

Message permanent page

— #1 sucks because that will cause confusion between non-root controllerviews and nested controllerviews

Message permanent page

— Use react or your vanilla code ?

— My own code

— Ok

— Your create dom copy in memory on initial render. right?

— I don't have a Virtual DOM like react

— I pretty much only use Flux with a templating system

— 😱