How to upload modified data in the repository redux the other component if you use routing?

Well. In General, when I get with ajax data from server(authentication, if successful go to the work list user) I have to throw them in the vault, but then after you go to the user page, the data again(I read that this is due to reboot, etc.)
5c98c8f059acf851693054.png5c98c9183d964038527118.png
Here he reducer
5c98c95895b30910312752.png
and action
5c98c978227a4768410742.png
Main
5c98cb1ae6e3e276575336.png
So. when the user sends the written data(authorization), I send them to the server and I receive a list of his old saved papers, and this list I need to get another component and go to its page(immediately after clicking send), but the problem is that the vault after the transition again becomes the same.
found something similar to the solution - this is the library redux-router, but as soon as I connect I get(unknown function func), library react-router, where before you could take syncHistoryWithStore and hashHistory generally obsolete and with them writes(this was not exported from react-router, although these methods are thus not suitable), found
1 solution is to wrap the button tag , but then pressing the button does not work with ajax, ie simply just throws the page.

In General please tell me if anyone knows how to solve it if possible.
March 19th 20 at 08:29
1 answer
March 19th 20 at 08:31
Solution
1. To initiate the transition to a new route without reloading the page, you call:
this.props.history.push('/user');
2. And spraviti first route on:
<Route exact path="/" component={Form} />
If you use property to render(in your case it makes no sense), then pass the argument to the properties of the router:
<Route exact path="/" render={routeProps => <Form {...rotueProps} />} />

3. No redux-router you do not need.
4. Do not be lazy to explore the possibilities of the libraries we work with. Native links are irrelevant to the router of your app. Suggest to study the source code of all components of the library react-router-dom. So you at least will have an understanding of how it works.
5. You thecommentary call const state = createStore();. Back.
6. Remove from the JQuery project. For AJAX requests, use axios/superagent/fetch.
7. The API requests to perform in a redux of the middleware. Suggest to use redux-thunk
And the General code is similar to the trash, and causes a bunch of issues, in particular, did the author of the Doc? Should be first to understand what is routing and how it works, then we would not be having such issues. Why pull in jQuery, React, remains a mystery. Next question will be where to take this.props.history, because he piled the crutches in the router in the form render'and + wraps the component in connect - maude.Johnst commented on March 19th 20 at 08:34
@maude.Johnst, Yes. Then the more I look, the more questions) - Dandre_Pfannersti commented on March 19th 20 at 08:37

Find more questions by tags ReduxReact