Skip to content
New issue

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

docs/v7/builtin-helpers/ #6

Open
utterances-bot opened this issue Jan 17, 2020 · 2 comments
Open

docs/v7/builtin-helpers/ #6

utterances-bot opened this issue Jan 17, 2020 · 2 comments

Comments

@utterances-bot
Copy link

Built-in Helpers

import Hint from 'react-admonitions'

https://squirrelly.js.org/docs/v7/builtin-helpers/

Copy link

I don't get why sometimes we have to prepend the variables with "options." and other times we can't do that, and mixing this up will cause the code to break with messages that don't give a hint of what happened, it is quite confusing 😕

@nebrelbug
Copy link
Collaborator

Hi @jeanroldao! Basically, whenever you write a data reference ({{ example }}) it automatically prepends it with options..

So the first item in a single data reference shouldn't have options.. A data reference with multiple items should have options. on all references but the first. Example: you should write {{example1 + options.example2}} instead of {{example1 + example2}}.

TL;DR
Basically, unless you're writing the first part of a data reference, you should use options.

I apologize for the confusion. This was a design flaw, and we deal with it differently in the next release (which will be released by the end of January).

Let me know if this helps 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants