localConfig

An app state of the local config currently loaded. This state allows you to use the config values of config.json in your react components. It immediately reflects to the state whenever the config file is changed. The data structure is same as the file content.


Accessing the State

The localConfig state provides information about the currently loaded local configuration settings of the application.

To get the localConfig state manually:

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

Connect the state with your React component:

  import { useSelector } from 'react-redux'
  const selector = ({ localConfig }) => localConfig
  const MyComponent = props => {
    const localConfig = 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!