Skip to content

Namespace Falcor data in Cerebral

Choose a tag to compare

@bfitch bfitch released this 06 Jan 04:02
· 2 commits to master since this release

Changelog

  • Bug Fix: Falcor data is now namespaced in baobab, which prevents overwriting cerebral only state. Resolves: #3

  • Falcor's source endpoint defaults to `'/model.json' and is not a required option

    Migration

  • A namespace can be passed as an option to the falcor module. It defaults to 'falcor':

controller.register({
  falcor: FalcorModule({
    namespace: 'custom', // optional, defaults to 'falcor'
    model: model
  })
});
  • Define the namespace in baobab:
const model = Model({
  page:'about',
  custom: {} // defaults to 'falcor'
});
  • Update components to grab namespaced data: