We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a second argument into page to define a dynamic/fallback content entry. Example in context of choo:
page
choo
var page = require('nanopage') var p = page(state.href, { source: `/bundles/${state.params.id}.json`, loaded: false })
This allows for pages to be added dynamically to state. Logic under the hood is something like:
function page (key, dynamic) { var content = state.content[key] if (!content && dynamic) { state.content[key] = dynamic content = state.content[key] } return content }
That second param could also be a function:
var p = page(state.href, key => ({ source: `/bundles/${state.params.id}.json`, loaded: false }))
@s3ththompson
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Allow a second argument into
page
to define a dynamic/fallback content entry. Example in context ofchoo
:This allows for pages to be added dynamically to state. Logic under the hood is something like:
That second param could also be a function:
@s3ththompson
The text was updated successfully, but these errors were encountered: