Course: Website on a chip: developing the react site #262
Unanswered
bmartinga
asked this question in
Course Qeustions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Mair,
In your course, "developing the react site" where you're toggling the led. You use const [ledOn, setLedOn] = useState(false); in App.tsx to set the initial state of the displayed led to off. If I have a variable in flash that knows the state of the led in the embedded code, how can I get this initial state into the above statement? My led state may be off or on, depending on the bool in the embedded code that is currently running and would like for the webpage to display the appropriate state. I'm just not sure how to get this embedded variable into the tsx file.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions