haunted icon indicating copy to clipboard operation
haunted copied to clipboard

Add useLayoutEffect

Open matthewp opened this issue 6 years ago • 5 comments

This is used to synchronously cause an effect directly after rendering. This could be useful for doing adoptedStylesheets stuff.

matthewp avatar Aug 13 '19 01:08 matthewp

What would this correspond to in the custom element lifecycle?

justinfagnani avatar Aug 28 '19 16:08 justinfagnani

Likely this would happen immediately after render(templateResult) is called.

matthewp avatar Aug 29 '19 11:08 matthewp

How would this work with LitElement integration? Should LitElement callback into Haunted in updated()?

justinfagnani avatar Aug 29 '19 17:08 justinfagnani

With the new State API there's a state.callEffects() for useEffect hooks, so I imagine something similar would be added for this.

matthewp avatar Aug 29 '19 19:08 matthewp

Fixed by #136 ?

cletusw avatar Aug 26 '20 19:08 cletusw