Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Fix rehydrate store for POST routes #99

Merged
merged 1 commit into from
Nov 9, 2015

Conversation

andersonba
Copy link
Contributor

Using a POST route, the RouteStore rehydrates the app using the static GET 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.

Added unit test to ensure the behavior.

@Vijar Vijar added the ready label Nov 6, 2015
@mridgway
Copy link
Collaborator

mridgway commented Nov 9, 2015

👍

@yahoocla
Copy link

yahoocla commented Nov 9, 2015

CLA is valid!

redonkulus added a commit that referenced this pull request Nov 9, 2015
Fix rehydrate store for POST routes
@redonkulus redonkulus merged commit 44f4dc8 into YahooArchive:master Nov 9, 2015
@redonkulus redonkulus removed the ready label Nov 9, 2015
@redonkulus
Copy link
Contributor

@andersonba now released in 0.3.2. thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants