Hope it’s not a noob question but I’m learning Plasmic by doing the ToDoMVP codegen tutorial. In the documentation the “TodoApp” component should look something like the first picture.
When I ask plasmic to generate the code, I got the second picture.
Is there somewhere in the documentation an explanation for the use of the React.forwardRef method ?
Also has someone implemented the ToDoMVP recently with this new implementation. I’m not able to retrieve the value entered in the “textbox” using a ref that is passed to the Task component (textbox.value is undefined when I try to update the Entries state - using the onChange callback)
It works with textbox. Actually I wrongly changed textbox.current!.value to textbox.value as the non-null assertion operator doesn’t seem to work in Javascript (seems to be typescript only and a discouraged practice as it can lead to run time error)
I can’t find the documentation of all props that can be set for Plasmic components somewhere or is it by assuming anything that can be set in their HTML equivalent? Or displayed visually in the Studio (right pane?)
That I get but how do I know what are the props. For instance I tried textbox.current.style by inferring that as it’s an input HTML element this should be accessible (and it worked)