Created
November 7, 2019 22:58
-
-
Save xettri/a704edf74cad672e2a642da6f0264f18 to your computer and use it in GitHub Desktop.
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, { Component } from 'react'; | |
import {connect} from "react-redux"; | |
class App extends Component { | |
constructor(props){ | |
super(props); | |
this.state = {} | |
} | |
componentWillMount(){ | |
} | |
render(){ | |
return ( | |
<> | |
<h1>Hello Its Working</h1> | |
</> | |
) | |
} | |
} | |
const mapStateToProps = state => { | |
return { | |
data: state.notifyReducer.data | |
} | |
} | |
const mapDispatchToProps = dispatch => { | |
return{ | |
abc : (val)=> dispatch({ type: 'SHOW_NOTIFY',payload:val,dispatch : dispatch}), | |
bcd : (val)=> dispatch({ type: 'CLEAR_NOTIFYss',payload:val,dispatch : dispatch}) | |
} | |
} | |
export default connect(mapStateToProps,mapDispatchToProps)(App) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment