@svkeg/re-theme
v2.1.3
Published
Simple Theme switcher / builder for React and React Native
Downloads
3
Readme
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 = {
// theme styles go here
}
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.