You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried a minimal install with latest preact-cli.
Right after component is connected with preact-redux, navigating to route with query params stops triggering rerender.
F.e. navigating to /profile or / works fine but that's not the case with /profile/john.
It works if i refresh page or after something (redux?) triggers props change. handleRoute function attached to <Router/> works fine.
With older versions (not sure preact or preact-router) everything works fine.
import{h,Component}from'preact';import{Link}from'preact-router/match';import{connect}from'preact-redux';
@connect(state=>state,{})exportdefaultclassProfileextendsComponent{render({ user }){return(<div><h1>Profile: {user}</h1><Linkhref="/">Home</Link>{/* this works fine */}<Linkhref="/profile">Me</Link><Linkhref="/profile/john">John</Link><Linkhref="/profile/foo">foo</Link><Linkhref="/profile/bar">bar</Link></div>);}}
The text was updated successfully, but these errors were encountered:
I looked into this and added a reproduction to the preact-redux issue. It's not likely to be related to preact-router, but rather that rendering a connected component with new props does not reevaluate its redux bindings.
I tried a minimal install with latest
preact-cli
.Right after component is connected with
preact-redux
, navigating to route with query params stops triggering rerender.F.e. navigating to
/profile
or/
works fine but that's not the case with/profile/john
.It works if i refresh page or after something (redux?) triggers props change.
handleRoute
function attached to<Router/>
works fine.With older versions (not sure
preact
orpreact-router
) everything works fine.The text was updated successfully, but these errors were encountered: