Using a POST route, the RouteStore rehydrates the app using the staticGET value as method, so, when I'll open a POST url, the server side renders correctly, but in the client side returns 404 (if you don't defined the same route with GET method).
Now, rehydrate gets the route method from state (state.currentNavigate.method).
I had to check if it exists because in error pages (eg. 404) currentNavigate is undefined, so, I use GET as default.
Using a POST route, the
RouteStore
rehydrates the app using the staticGET
value as method, so, when I'll open a POST url, the server side renders correctly, but in the client side returns 404 (if you don't defined the same route with GET method).Now,
rehydrate
gets the route method from state (state.currentNavigate.method
). I had to check if it exists because in error pages (eg. 404)currentNavigate
isundefined
, so, I useGET
as default.Added unit test to ensure the behavior.