Say you want to warn users before closing the page, but only when a specific component is loaded, here’s what to do:
Category Archives: Article
Notifying users about updates (create-react-app)
In serviceWorker.js there is a function that sits around line 74, called installingWorker.onstatechange. Inside of the function there is a condition checking if the state is “installed” and then logging out a message for the console. The goal here is to simply insert your own code below to notify the user of this outside of […]
Merging WordPress’ REST API with React
In the past, my go to method of quickly spinning up a blog for myself has been just directly posting into my database, spinning up a quick API in PHP and then rendering the page with some sort of Javascript framework (I prefer React). I’ve since realised, though, that using WordPress’ REST API is essentially […]