Skip to content

Instantly share code, notes, and snippets.

@glcheetham
Last active May 20, 2016 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glcheetham/6539cceaa91c65668164bfcbba6efd6d to your computer and use it in GitHub Desktop.
Save glcheetham/6539cceaa91c65668164bfcbba6efd6d to your computer and use it in GitHub Desktop.
React component using strategy pattern instead of switch
// 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