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

Prevent history update before navigation complete #28

Conversation

ertrzyiks
Copy link

Hey,
i migrated from router component to fluxible-router and after click on NavLink i see bottom of page instead of top. I also noticed that before migration url was changing after action succeed. Now it change url first and then action is called. Is is working as expected?

This PR is just example of solution which fixed both issues for me :) It will not fire history update before action completes.

What do you think?

@yahoocla
Copy link

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.28%) to 99.15% when pulling d12e190 on ertrzyiks:prevent-update-before-complete into caab184 on yahoo:master.

@mridgway
Copy link
Collaborator

We will probably not want to do this in the library. Ideally, you should render the new page immediately, but if the data isn't available for every component, render a loading or temporary view of the component. This way, the user gets instant feedback about the page navigation and the page will fill in the view as that data becomes available instead of waiting for the full page data to be available (which is preceptively slower).

@mridgway mridgway closed this May 26, 2015
@ertrzyiks
Copy link
Author

@mridgway you are right. I dug little more and turns out that my application has condition race on stores and that cause invalid transition between routes. Thanks for answer!

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

4 participants