3 ms·
So what you are saying is that if you want to show/hide something dynamically on the webpage you should use React? lol Also, maybe it is from lack of experienc
by romanovcode 7y ago
So what you are saying is that if you want to show/hide something dynamically on the webpage you should use React? lol
Also, maybe it is from lack of experience. Because you can add classes to your elements and depending on them you can hide/show all of them with just
$('.toggle-element').toggle();
- benbristow 7y agoWell it gets more complex when there’s more business rules. Like if you have 1 checkbox checked need to show this one bit but if you have 2 need to show all of them. It’s just an example. Trying to scope it all gets a bit unruly too. Your example would target every element on the page. If you have nested components it’s a nightmare.