New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@sv-keg/re-theme

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sv-keg/re-theme

Simple Theme switcher / builder for React and React Native


Version published
Maintainers
6
Created

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.

FAQs

Package last updated on 25 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts