- Lib that implements flux architecture
Has several reducers, which stores all data for a given attribute of your aplication
Components can subscribe to it and get current state of the store everywhere on the app
Listens to actions Where you should do calculations and such Divides the store into sesible parts, where info is related
Has a type, which describes what is happening on the store Has a payload, which contains the data that will be stored
react-router-dom
When you have a <Header />, you need to use your browser router inside your App.js and include it in there along with routes, like this:
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import Routes from './routes';
function App() {
return (
<BrowserRouter>
<Header />
<Routes />
</BrowserRouter>
);
}
This makes your header able to access routes and navigation
Allows only one route to be called at each moment