Skip to content

Accessing button using ref

I’m not able to access the button using ref. Below is my code sample, In I keeping the undefined for completeSubmissionButton. I’m not sure what’s the solution for it. Answer You can’t provide a ref to React component ,ref only work in a native html element so you need to pass your But…

Create a Listed (Nested) Element in a Javascript object

My question comes from this answer to a similar question. The comment below the answer sums up my question how would the code look like if you would like to give depth to the tree? Like for name i would like to give name.firstname and name.lastname. Would I need to define name as var? This is my current code …