# react-hoisted-state

> nest meta-data inside your react-tree and get notified on state change

Latest version **0.0.0** (published 2015-09-18) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2015-09-18 |
| First published | 2015-09-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gaetano Checinski |
| Maintainers | nikhedonia |
| Keywords | meta, data, state, hoist, react, notification |

## Links

- npm: https://www.npmjs.com/package/react-hoisted-state
- Repository: https://github.com/nikhedonia/react-hoisted-state
- Issues: https://github.com/nikhedonia/react-hoisted-state/issues
- npm.io page: https://npm.io/package/react-hoisted-state

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^0.14.0-rc1

## 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

- 0.0.0 (latest) — 2015-09-18

## README

#React-Hoisted-State

Embed and extract State from The React Tree

#Examples

```js

var keywords= [];

function visit(obj,event){
  switch(event){
    case 'mount':
    case 'unmount' :
    case 'render' :
      //`this` is the component, do sth. with it...
    break;
  }

  if(obj.keywords) keywords = keywords.concat(keywords);

}

const Title = ({children})=>(
<State title={children.toString()}/><h2>
  {children.toString()}
</h2></State>
);


const body = React.renderToString(
  <Hoist visit={getKeywords} />
    <article>
      <Title>How to Hoist State</Title>
      foo
    </article>

    <article>
      <Title>some other article </Title>
      bar
    </article>
  </Hoist>
);

const html = `
<html>
<head>
<title>titles.join(' - ')</title>
</head>
<body>${body}</body>
</html>
`

```

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