natefaubion / purescript-spork

Elm-like for PureScript
MIT License
157 stars 9 forks source link

Run effect upon mounting (lifecycle methods?) #28

Closed i-am-the-slime closed 5 years ago

i-am-the-slime commented 5 years ago

How would I run some side effect once the DOM element has been created? new MDCRipple(document.querySelector('.cancel')); Can I just hook into some "on..." event?

i-am-the-slime commented 5 years ago

Just answered by @natefaubion on the chat: Use ref as shown in the TodoMVC example.