A JavaScript reverse CSS selector

In plain Javascript, you can get a reference to a particular HTML element by using the querySelector method. For example: document.querySelector('div') Will give you a reference to the first "div" that's encountered in the page. Give it a try in DevTools Sample querySelector What if we want to do the reverse? That is, given an … Continue reading A JavaScript reverse CSS selector

Living without React Router

How do you handle the scenario when a user taps the "back button" in your ReactJS app? In a plain vanilla ReactJS app you'll end up with the user navigating off your app since it's a SPA. Most devs would tell you to use React-Router. What if you can't, or - how does React-Router work? … Continue reading Living without React Router