-
Notifications
You must be signed in to change notification settings - Fork 63
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
dummy React state from design props? #167
Labels
Comments
ericandrewscott
changed the title
dummy React state from props?
dummy React state from design props?
Sep 19, 2024
Hi @ericandrewscott . This has been supported in the new release. |
@rrabherufigma I don't think this is fixed. I updated to 1.1.4 and published, and I still get:
This is from the props:
I would expect it to render: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way for me to scaffold some React state and have it use data from props? Let me give you an example.
We have a Slider component, and based on the value in the design component, we'd like to scaffold the right value in state.
Here's our current code:
But we'd like to do:
const [value, setValue] = React.useState<number>(initialValue)
and have it render as the integer from the props.
And then in the props itself, have it be:
<Slider ... value={value} />
For now, it's easier to instruct our users with comments how to hook it up, but it's not ideal.
The text was updated successfully, but these errors were encountered: