# tags

Source: https://developers.inkdrop.app/states/tags

An [app state](https://developers.inkdrop.app/guides/flux-architecture) of note tags currently loaded for the sidebar.
You can obtain the `tags` state and integrate it with React components.

---

## Data Structure

- **all** (Tag\[])

  An array of [Tag](https://developers.inkdrop.app/data-access/tags)s.
- **hash** ({ \[tagId]: Tag })

  A map where keys are tagIds and values are [Tag](https://developers.inkdrop.app/data-access/tags)s.
- **lastUpdatedAt** (number)

  Last datetime when the state was changed.

Get the `tags` state manually:

```js
const { tags } = env.store.getState()
```

Connect the state with your React component:

```js
import { useSelector } from 'react-redux'
const selector = ({ tags }) => tags
const MyComponent = props => {
  const tags = useSelector(selector)
  // render
}
```
