Created
May 12, 2019 14:04
-
-
Save cyb3rsalih/1bbc2ed7df9b2645dfd6dc016e08d54b to your computer and use it in GitHub Desktop.
Redux-4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './css/index.css'; | |
import App from './pages/App'; | |
import {BrowserRouter as Router } from 'react-router-dom' | |
import { createStore } from 'redux' | |
function reducer(){ | |
return 'My State' | |
} | |
const store = createStore(reducer) | |
const action = { | |
type: 'CHANGE_STATE', | |
payload: 'My New State' | |
} | |
console.log(store.getState()) | |
ReactDOM.render(<Router> <App/> </Router> , document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment