question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Making Found react to Farce push/replace actions

See original GitHub issue

Issue Description

I set up Found using the createConnectedRouter way. When I dispatch push or replace actions from Farce, I see that they’re dispatched, but the reducer state doesn’t change and as a result I’m not redirected to the target location.

Is there anything obvious that I missed in the config? Basically I need a way to redirect the user from within my action creators.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
taioncommented, Jun 19, 2017

Going to close this out for now – this seems like a Redux limitation with a few decent enough workarounds, and I don’t want to constrain the API by making these be strictly middlewares.

0reactions
taioncommented, May 12, 2017

It gets used by the rest of Found to pass methods around from the store.

Take a look at the code snippet I have above. There’s no necessary or technical reason why middlewares can’t dispatch upstream to enhancers.

You can also see that the core of both Farce and Found does sit in middlewares, so we could rejigger the API to expose the middlewares more directly. However, I don’t think I can get around the requirement of having to stick some methods onto the store, to allow e.g. the pattern where you just set up a <Provider> and pass everything around on the store object, without exposing users to potential bugs in case they install a middleware or enhancer before the Farce/Found middlewares that make actions async, or something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Programmatically navigate using React router - Stack Overflow
React Router makes the properties and methods of the history instance associated with your router available through the context, under the router object....
Read more >
CommonActions reference - React Navigation
A navigation action is an object containing at least a type property. ... navigator will create a new route with the specified key...
Read more >
How To Use Routing with React Navigation in React Native
First, create a new React Native app by entering the following command in your terminal: npx react-native init MySocialNetwork --version 0.63.2.
Read more >
React Navigation re-render / reset previous page's state on ...
actions.js (image from code). In above case, you dont have any scope to change the state of the parent component and clear the...
Read more >
React Native Navigation: Tutorial with examples
Using stack navigator to navigate between screen components. Let's begin by first creating a /components folder in the root of our project. Then ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found