Skip to content

Instantly share code, notes, and snippets.

@zouhir
Created October 8, 2018 21:38
Show Gist options
  • Save zouhir/878acd92bb5048584ea17f750aa694ab to your computer and use it in GitHub Desktop.
Save zouhir/878acd92bb5048584ea17f750aa694ab to your computer and use it in GitHub Desktop.
//unistore connector
@connect(
["level", "tiles"],
actions
)
export default class GameRoute extends Component {
componentDidMount() {
let level = this.props.matches.level
// actions has a mathod called startGame
this.props.startGame( {level} )
}
render({level, tiles}){...}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment