An app state of notes currently loaded for the note list bar.
You can obtain the notes state and integrate it with React components.
Data Structure
- Name
items- Type
- Note[]
- Description
An array of Notes.
- Name
hashedItems- Type
- { [noteId]: Note }
- Description
A map where keys are noteIds and values are Notes.
- Name
lastQuery- Type
- NoteQuery | undefined
- Description
The last note query to show the list of notes.
- Name
cursor- Type
- NoteQueryCursor | null
- Description
The current cursor to list the notes.
- Name
totalRows- Type
- number
- Description
Number of items.
- Name
timestamp- Type
- number
- Description
Last datetime when the state was changed.
- Name
viewOptions- Type
- NotesViewOptions | undefined
- Description
The note list view options.
- Name
loading- Type
- boolean
- Description
truewhile notes are being loaded.
Get the notes state manually:
const { notes } = inkdrop.store.getState()
Connect the state with your React component:
import { useSelector } from 'react-redux'
const selector = ({ notes }) => notes
const MyComponent = props => {
const notes = useSelector(selector)
// render
}