--

Thanks for reading and responding Akash. I updated the article to reflect why ReactElement isn't a great choice. As an example, you might expect an array of ReactElement[] as children, but then someone passes a string, and that will throw an error. So I'd recommend a different prop if you need to pass ReactElement or ReactElement[].

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet