react-dark-state
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

React Dark State

React Dark State a custom react hook to detect dark mode

Getting Started

Install package with npm

npm install react-dark-state

or with yarn

yarn add react-dark-state

Usage

import React from "react";
import useDarkState from "react-dark-state";

function App(){
  const darkState = useDarkState();

  return(
    <h1>Current State: { darkState }</h1>
    // Current State: dark/light
  )
}

Package Sidebar

Install

npm i react-dark-state

Weekly Downloads

0

Version

2.0.2

License

none

Unpacked Size

16.2 kB

Total Files

8

Last publish

Collaborators

  • ssakib4040