Thanks for this. I learnt a lot following your explanations. But I have a point to make. The reason he had the onClick function on the row is to be able to click the row to check and uncheck the box, removing it won't give that opportunity anymore. You can now only click the box to check and uncheck after removing it.
Yeah that's true. I mention in the video that removing the click handler from the tr is a change in behavior. But in the original code there's a click handler on the tr and on the input which doesn't make sense imo. And if we wanted to make the tr clickable we would have to adjust more things like setting a tab index to make it accessible. So I just opted for using the input
Hello I’m a Jr. Full Stack Developer. I’m a 5 year Army vet. My goal is to meet a lot of developers to collaborate and learn from in order to grow as a junior developer.
Location
Colorado, US
Education
Bachelors in Cyber Security and currently working on Masters in Software Engineering.
This is really cool to see how in depth you went with this. As a junior react developer myself I’ve never seen any utilize the document object within a react application. Is this as common as it seems?
Yeah, it's not very common. There are scenarios where it's required. For example, when you need to attach a scroll or click listener to the HTML body. Or maybe when you work with third-party tools where you can't use a ref. But in most cases there's a more React-like alternative.
👋Pierre-Henry, a passionate Sr AI Software Engineer 😎 I create cool stuff (https://github.com/Lifyzer & https://github.com/pH7Software), love problem-solving, eating veggies, & developing new skills
Thanks for React information. I use Perl in my web development. I can combinate with Perl and React.
Nice video. Great to see your thought process
Thank you 🖐
Really interesting. Thanks for this informative article!
Thanks, I'm glad you liked it
Thanks for this. I learnt a lot following your explanations. But I have a point to make. The reason he had the onClick function on the row is to be able to click the row to check and uncheck the box, removing it won't give that opportunity anymore. You can now only click the box to check and uncheck after removing it.
Yeah that's true. I mention in the video that removing the click handler from the
tris a change in behavior. But in the original code there's a click handler on thetrand on theinputwhich doesn't make sense imo. And if we wanted to make thetrclickable we would have to adjust more things like setting a tab index to make it accessible. So I just opted for using the inputThis is really cool to see how in depth you went with this. As a junior react developer myself I’ve never seen any utilize the document object within a react application. Is this as common as it seems?
Yeah, it's not very common. There are scenarios where it's required. For example, when you need to attach a scroll or click listener to the HTML body. Or maybe when you work with third-party tools where you can't use a ref. But in most cases there's a more React-like alternative.
Great read! Thanks for sharing this with us Johannes! 👌
Thanks for sharing this refactoring code it was really interesting. Mainly in the use of Set.