Open rosostolato opened 1 year ago
If you create a template before calling the component life cycle hook (onInit, onDestroy), it won't work:
function App() { const template = <MyComponent />; onDestroy(() => {}); return ( <div>{template}</div> ); }
I realized that it doesn't work when the template is mounted before you call the hook. Need to update the currentComponent to be an instance stack with all the component tree within it.
template
currentComponent
If you create a template before calling the component life cycle hook (onInit, onDestroy), it won't work: