tags

An app state of note tags currently loaded for the sidebar. You can obtain the tags state and integrate it with React components.


Data Structure

  • Name
    all
    Type
    Tag[]
    Description

    An array of Tags.

  • Name
    hash
    Type
    { [tagId]: Tag }
    Description

    A map where keys are tagIds and values are Tags.

  • Name
    lastUpdatedAt
    Type
    number
    Description

    Last datetime when the state was changed.

Get the tags state manually:

const { tags } = inkdrop.store.getState()

Connect the state with your React component:

import { useSelector } from 'react-redux'
const selector = ({ tags }) => tags
const MyComponent = props => {
  const tags = useSelector(selector)
  // render
}
Can you help us improve the docs? 🙏

The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!