Interesting feature and very well explained! Thank you! One question, on the RenderName component, could i have used 'data' returned from the useFormStatus hook to get the name to display, instead of passing it directly as a prop?
@statixos2893Ай бұрын
Very Well Explained .
@shrutikapoor08Ай бұрын
Thank you!
@BurkhardReffelingАй бұрын
Wouldn't you have to wrap your setTimeout function in a promise for this to work at 5:20? Otherwise I'd assume that isPending has already been flipped back to false if you check for it inside of the setTimeout callback (unless there's some other magic going on)
@praveenscienceАй бұрын
Very nice one! Would love to teach the same way in Tamil to my folks! 💯
@shrutikapoor08Ай бұрын
Wohoo awesome! Let me know if you need help. I will create one in Hindi too. Do you have an editor?
@praveenscienceАй бұрын
It's new for me to see an array being passed to the setTimeout's second parameter. I thought it's a number of milliseconds, but array? What does this mean?
@shrutikapoor08Ай бұрын
Oh wow good eye! Thanks for catching that. That's definitely a typo. The reason it still works and didn't throw an error is because that value is evaluated to a number, so [500] still works. Sharing a JS fiddle to demonstrate how num conversion happens - jsfiddle.net/n7wv0mLt/17/
@praveenscienceАй бұрын
@@shrutikapoor08 Yep, I saw the article called how automatically the numerical values are converted silently by JS! 😅