How to use the @sanity/state-router.createScope function in @sanity/state-router

To help you get started, we’ve selected a few @sanity/state-router 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 sanity-io / sanity / packages / @sanity / imagetool / example / browser.js View on Github external
createRoute('/:demoName/*', params => {
    return params.demoName ? createScope(params.demoName, createRoute('/:imageIndex')) : []
  })
])

@sanity/state-router

A path pattern => state object bidirectional mapper

MIT
Latest version published 2 years ago

Package Health Score

75 / 100
Full package analysis