Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Back button doesn't work #39

Closed
ZucchiniZe opened this issue Nov 21, 2015 · 10 comments
Closed

Back button doesn't work #39

ZucchiniZe opened this issue Nov 21, 2015 · 10 comments

Comments

@ZucchiniZe
Copy link

Going back routes using the browser's back button does not work on the first try, without triggering any actions it takes 3 tries but when I trigger an action it requires a lot more to get back, e.g. 9 clicks of the back button when 2 actions triggered and 14 again when 4 actions triggered.

If it is useful, I am using react-router's <Link /> component to fashion my links.

@preflight
Copy link

Confirming that this is the case for me also, and I'm also using <Link>. The number of back clicks seems to correspond with the number of history entries being created. I suspected that this was occurring from handling the UPDATE_PATH action in my application, but removing this doesn't change the behavior.

@jlongster
Copy link
Member

Any chance that you all could try this experimental branch? #40

I believe that's going to solve a lot of these issues.

@jlongster
Copy link
Member

Please try 0.0.9, it should be much more robust. Please re-open this issue if you have problems! I'm 99% sure this should be fixed.

@spacesuitdiver
Copy link

I'm having this same issue with 0.0.10. Component which initiates the updatePath is here:

https://github.com/LeBlaaanc/react-webapp/blob/master/src/components/molecules/SignUpLink/SignUpLink.jsx#L15

It seems transition properly though back doesn't seem to work.

@jlongster
Copy link
Member

Check out #45, we're debugging those kind of issues there now.

@spacesuitdiver
Copy link

@jlongster I think maybe I am not binding the updatePath action to the store properly. I'm going to simplify this and use dispath(updatePath(...)) and see if this helps. Might be my fault.

Does this look right?
https://github.com/LeBlaaanc/react-webapp/blob/master/src/components/molecules/SignUpLink/SignUpLink.jsx#L6

EDIT:
After just dropping updatePath() directly into my component and firing with this.props.dispatch I still have the same issue. Will follow #45 for updates.

@dimroc
Copy link

dimroc commented Dec 21, 2015

Hi all,
I'm also having an issue with the back button. Essentially, the back button doesn't pop the state object. This results in the browser going back a page but not updating the state object and therefore the contents of the page.

Perhaps I'm doing something wrong. Any help would be appreciated!

@shea256
Copy link

shea256 commented Jan 25, 2016

@dimroc @jlongster I'm having the same issue and I have npm version 2.1.0.

@jlongster
Copy link
Member

Please open a new issue with your specific STR.

@kevnk
Copy link

kevnk commented Apr 14, 2016

Hi All, did anyone find (and remember) a solution here? @jlongster what's "STR"?

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

No branches or pull requests

7 participants