Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@team-griffin/react-dye

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@team-griffin/react-dye

```sh npm i --save @team-griffin/react-dye

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
4
Weekly downloads
 
Created
Source

react-dye

npm i --save @team-griffin/react-dye

yarn add @team-griffin/react-dye

This package was created as I was fustrated with the existing theming options for react which all use context or try and resolve the styles for you.

This package uses react-broadcast to avoid the sCU problem.

Note: We do not recommend using this on every component that you need to have the theme object. This is for those edge cases where you can not pass props down the tree any further due to something blocking it (like react-router v3).

Usage

// A.js
import { ThemeProvider } from '@team-griffin/react-dye';

const theme = getYourThemeFromSomewhere(); // Usually this is passed

return (
  <ThemeProvider theme={theme}>
    <MyComponentTree/>
  </ThemeProvider>
);

// B.js
import { withTheme } from '@team-griffin/react-dye';

const MyComponent = (props) => {
  console.log(props.theme);
  return (<div/>);
};

export default withTheme()(MyComponent);

FAQs

Package last updated on 30 Apr 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc