I'm learning React.js and I struggled with the following problem:
My react app stopped working after adding "createBrowserHistory" with Saga.
Essentially, I want to redirect users to the Cart Page (/cart) when I click on "Add to Cart" button.
Example:
That is the home page:
When I click on "Add to Cart" button, it navigates to the "/cart" route. However, it doesn't show anything and, there is no error in the console.
I have made the following changes in my code:
Added history package:
Created history file:
Changed App.js file:
Changed saga file. I expect to navigate to the "/cart" route after doing some jobs...
The problem is here! I want to fix the problem in my saga file only.
I've created a Pull Request here, to reproduce the error. Feel free to have a look at this.
https://github.com/willianfalbo/online-shoes-app/pull/1
I'm willing to bounty someone who creates a PR for me. I will also accept your answer here!





