mainLayout
View in MarkdownSourceAn app state of the editor.
You can obtain the mainLayout state and integrate it with React components.
Data Structure
- Name
- distractionFreeEnabled
- Type
- boolean
- Description
- trueif distraction-free mode is enabled
 
- Name
- sidebarVisible
- Type
- boolean
- Description
- trueif side bar is visible
 
Get the mainLayout state manually:
const { mainLayout } = inkdrop.store.getState()
Connect the state with your React component:
import { useSelector } from 'react-redux'
const selector = ({ mainLayout }) => mainLayout
const MyComponent = props => {
  const mainLayout = useSelector(selector)
  // render
}