Last active
May 20, 2016 19:23
-
-
Save glcheetham/6539cceaa91c65668164bfcbba6efd6d to your computer and use it in GitHub Desktop.
React component using strategy pattern instead of switch
This file contains hidden or 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
// React componey using the strategy pattern instead of switch | |
import React from 'react' | |
const Registration extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
return ( | |
{this.state.ActiveComponent()} | |
) | |
} | |
} | |
export default Registration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment