codedamn

React.

Asked by Sasikanth Inaganti about a year ago

1

hi for the todo app inorder to add new elements i was calling the input tag from document for every button click to use in the newly created element instead of using use state is that fine in react terminology. what are the disadvantages?

IMAGE: https://storage.crisp.chat/users/upload/visitor/346730e9795bdc00/screenshot-44_1s4ynkc.png

1 Answer

    1

    There are no disadvantages. You're just storing an object (JSX) in the state array. It should work fine too.

    @mehulmpt

    Mehul Mohan

    @mehulmpt

Your answer