ReTheme
Simple React and React Native Theme builder / switcher
Setup
Add to your package.json
"re-theme": "git+https://github.com/simpleviewinc/re-theme"
Example
import { ReThemeProvider } from 're-theme'
const myCustomTheme = {
}
export const App from Component {
state = { theme: myCustomTheme }
componentDidUpdate = () => {
this.props.theme !== this.state.theme &&
this.setState({ theme: this.props.theme })
}
render(){
return (
<ReThemeProvider theme={theme} merge={false} >
<App />
</ReThemeProvider>
)
}
}
API
Checkout the Example App for documentation.