How to use the overmind/config.namespaced function in overmind

To help you get started, we’ve selected a few overmind examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nscozzaro / physics-is-beautiful / courses / static / courses / js / containers / StudioViews / EditorsViews / containers / LessonWorkSpace / Codesandbox / app / overmind / index.ts View on Github external
import * as preferences from './namespaces/preferences';
// import * as profile from './namespaces/profile';
import * as server from './namespaces/server';
// import * as userNotifications from './namespaces/userNotifications';
import * as workspace from './namespaces/workspace';
import { onInitialize } from './onInitialize';
import { state } from './state';

export const config = merge(
  {
    onInitialize,
    effects,
    state,
    actions,
  },
  namespaced({
    preferences,
    // userNotifications,
    // patron,
    editor,
    // live,
    // workspace,
    // dashboard,
    // deployment,
    files,
    // git,
    explore,
    // profile,
    server,
    modals: createModals(modals),
  })
);
github cerebral / overmind / packages / overmind-website / src / overmind / index.ts View on Github external
import { IConfig } from 'overmind'
import { merge, namespaced } from 'overmind/config'
import state from './state'
import onInitialize from './onInitialize'
import * as actions from './actions'
import * as effects from './effects'
import { createHook } from 'overmind-react'

export const config = merge(
  {
    onInitialize,
    state,
    actions,
    effects,
  },
  namespaced({
    foo: {
      actions: {
        foo: () => {},
      },
    },
  })
)

declare module 'overmind' {
  interface Config extends IConfig {}
}

export const useOvermind = createHook()
github codesandbox / codesandbox-client / packages / app / src / app / overmind / index.ts View on Github external
import * as preferences from './namespaces/preferences';
import * as profile from './namespaces/profile';
import * as server from './namespaces/server';
import * as userNotifications from './namespaces/userNotifications';
import * as workspace from './namespaces/workspace';
import { onInitialize } from './onInitialize';
import { state } from './state';

export const config = merge(
  {
    onInitialize,
    effects,
    state,
    actions,
  },
  namespaced({
    preferences,
    userNotifications,
    patron,
    editor,
    live,
    workspace,
    dashboard,
    dashboard_new,
    deployment,
    files,
    git,
    explore,
    profile,
    server,
    modals: createModals(modals),
  })
github frontity / frontity / packages / core / src / stores / config.ts View on Github external
export default ({
  namespaces,
  settings
}: {
  namespaces: { [key: string]: Namespace };
  settings: Settings;
}) =>
  namespaced(
    Object.entries(namespaces).reduce(
      (config, [namespace, module]) => {
        if (module.Store) config[namespace] = module.Store;
        return config;
      },
      { settings }
    )
  );