i'm working on my portfolio using a React cousin Preact
. Component lifecycle are the same and i want to update the route that display details about a project when clicking on another project and i'm lost😅.can you please help me?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (6)
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
Can you share any code? In order to see what you have.
You Can check thé demo here: for example
By trying to click another projects on the side.
I'll show some codes when i'll bé on my PC
Mmmm, may be there ?
github.com/developit/preact#compon...
If this is specifically about the router portion, are you missing something like this?
developit / preact-router
:earth_americas: URL router for Preact.
preact-router
Connect your Preact components up to that address bar.
preact-router
provides a<Router />
component that conditionally renders its children when the URL matches theirpath
. It also automatically wires up<a />
elements to the router.See a Real-world Example ➡️
Usage Example
I'd already check and use or.the problem is n'ont coming from the router.
Route work well.please if you Can check this and try to it something in ##other project## on the right side