S
S
Stepan Turchenko2020-08-23 00:42:16
React
Stepan Turchenko, 2020-08-23 00:42:16

Why connected-react-router if there is window.history?

Why connect the bible, forward it to the store, so that later you can see information about navigation, if you can just turn to history, or what can you get from this library, which is not in window.history

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
t800zippygod, 2020-08-23
@StepanTur

If you just need to get data about the page, you can use this method. If you want to use this data to dynamically change the address of pages, etc., then it is preferable to use the library.
The point is that React is essentially one big abstraction built over a house. If you start to get out of abstraction to lower levels, then it will start to leak. In the same way, you can also hang events on addEventListener, but React does not recommend doing this, since there is a ready-made toolkit for handling events

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question