DEV Community

Discussion on: How do you handle a component update ?

Collapse
 
andy profile image
Andy Zhao (he/him)

I believe the lifecycle methods are the same for Preact. In general, you should be able to setState and that should update your component.

For routes, maybe the Preact router readme will help? github.com/developit/preact-router