# react-dark-state

> React Dark State a custom react hook to detect dark mode

Latest version **2.0.2** (published 2024-04-12) · 0 weekly downloads

## Install

```sh
npm install react-dark-state
pnpm add react-dark-state
yarn add react-dark-state
bun add react-dark-state
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2024-04-12 |
| First published | 2022-07-17 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sadman Sakib |
| Maintainers | ssakib4040 |
| Keywords | react, dark state, react dark state, react dark mode |

## Links

- npm: https://www.npmjs.com/package/react-dark-state
- Repository: https://github.com/ssakib4040/react-dark-state
- Homepage: https://github.com/ssakib4040/react-dark-state#readme
- Issues: https://github.com/ssakib4040/react-dark-state/issues
- npm.io page: https://npm.io/package/react-dark-state

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2024-04-12
- 2.0.1 — 2024-04-09
- 2.0.0 — 2024-04-09
- 1.0.1 — 2023-08-06
- 1.0.0 — 2022-08-09
- 0.1.1 — 2022-07-17
- 0.1.0 — 2022-07-17

## README

# React Dark State

React Dark State a custom react hook to detect dark mode

## Getting Started

Install package with npm

```bash
npm install react-dark-state
```

or with yarn

```
yarn add react-dark-state
```

## Usage


```jsx | pure
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
  )
}
```

---
_Source: https://npm.io/package/react-dark-state · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
