@sv-keg/re-theme
v2.2.2
Published
Simple Theme switcher / builder for React and React Native
Downloads
1
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.