I couldn’t find a simple enough React context example so I made one.
I’ve recently started using Cypress for testing web applications, and even for unit testing. One thing that was not immediately clear to me was how to stub (aka, fake) a basic thing like an alert, so that I can “listen” for this alert to be called, and assert that yes, it was indeed called.
Today 14th of March 2019 I was surprised reading the chart of the top 10 npm packages served by jsdelivr.com, as it contains some entries I never heard of, and some others I would’t expect to top the chart.
Redux is a small popular library used to keep track of the state of an interface without going crazy. It is mainly used together with React, a popular library used to create snappy user interfaces on the web.
Getting started with redux might take a while, because you need to get accustomed to the way it does things. In this post i want to cut straight to the meat of the issue, without unnecessary technical explanations. I will show you how to get started with Redux in a React project.
This might be old stuff for many people out there and I know that most things can be accomplished with the amazing WP API, still I think it’s good to have a simple example of using AJAX to call a WordPress function in one post. Here we go!