3.13.0 • Published 1 year ago

@exodus/ui-config v3.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@exodus/ui-config

Helper for storing various UI-specific settings/config. Use this ONLY for UI-specific settings/config. Most data is NOT UI-specific and should be managed by domain-specific features/modules/atoms in the background.

Valid examples:

  • Boolean flag that controls whether to show price maps in the UI
  • Boolean flag that flips to true after onboarding was shown
  • Counter for how many times a modal has been shown, or needs to be shown

Usage

import uiConfig from '@exodus/ui-config'

// exodus is created via `@exodus/headless`
exodus.use(
  uiConfig({
    config: [
      // Note: these are NOT atom definitions, they're only metadata about atoms: `id` and later `type` (so we can
      // internally instantiate different types of atoms)
      //
      // these are emitted to the `port` as events 'delightUser' and 'terrifyUser'
      { id: 'delightUser' },
      { id: 'terrifyUser' },
    ],
  })
)

// API usage
exodus.uiConfig.delightUser(true)
exodus.uiConfig.terrifyUser(false)

// Port events feature emit data from atoms in with following format: port.emit('delightUserAtom', value)

3.13.0

1 year ago

3.12.1

1 year ago

3.12.0

1 year ago

3.11.0

1 year ago

3.10.2

1 year ago

3.10.1

1 year ago

3.10.0

1 year ago

3.9.0

1 year ago

3.8.0

1 year ago

3.7.2

2 years ago

3.7.1

2 years ago

3.7.0

2 years ago

3.6.1

2 years ago

3.6.0

2 years ago

3.5.0

2 years ago

3.4.0

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago