apollo-link-rest let's you integrate with RESTful endpoints through GraphQL using Queries and Mutations, just like you would do with your GraphQL API. In this article we'll walk through how to set up your Apollo Links to take advantage of this library.
React gets its name from being reactive to changes in your data. When data changes, the UI reacts to those changes to re-render the page to match the data. Data is known as two things in React: state and props. State is data owned by the component itself, whereas props are data which come from th...
We'll take a look at how to use GraphQL with React using the Apollo GraphQL library and GitHub's new GraphQL API. We'll look at setting up our client, provider, and finally writing and executing our GraphQL query.
In this article we'll cover the array functions map, reduce, filter, sort, and slice to convert data into the format required for the Nivo pie chart.
In this article we'll look at a function that makes an HTTP request using the axios library to the Unsplash API and figure out how we can test it using a fake/mock version of axios to avoid performing real HTTP requests. We will be using Jest and some mocking functionality that it provides.
In this article we'll cover how to test React components that contain asynchronous code using mocks in Jest. We'll refactor our component to make it more easily testable and mockable, allowing the test to run without making an actual AJAX request.
We'll take a look at the new React Context API, how to use it, what it does, and if it should replace Redux or MobX for your go-to state management option.
How to implement and test an error boundary in React. Error boundaries allow us to catch errors (and display friendly messages to our users) that occur during render in our components. We'll implement the error boundary using render props and see how to suppress an annoying error message during testing.
In this article we'll look at how to get up and running with testing React in a create-react-app. We'll look at how to configure your tests and tackle 3 common testing patterns. We'll use Jest, Enzyme, and Sinon, exploring the differences between the render, mount, and shallow functions provided by Enzyme.
We take an app from component state to MobX, then the same app from component state to Redux and talk about the differences. Async code in both MobX and Redux is covered!
React Motion is an animation library loved within the React community. I have to say that having some experience with libraries like GSAP, it isn't the easiest to comprehend, but its power comes from the ability to directly tie animations to your state.
A Struct in Ruby is one of the built-in classes which basically acts a little like a normal custom user-created class, but provides some nice default functionality and shortcuts when you don't need a full-fledged class.
An ultimate list of Ruby resources, books, courses, people to follow, etc... This list contains resources I have used over the years while learning and writing Ruby (on Rails) professionally.
I've always loved MobX because of it's lack of boilerplate in comparison to Redux. It just seems so effortless to modify state... so how does it fare with Async code? In Redux you'd reach for something like thunk, but in MobX there are a few easy ways you can deal with asynchronous code. This t...
As of React 16.3 there will be a new way to create "refs" (references to the actual underlying DOM element). Below we'll go over each one and talk about its pros and cons. To learn all about Refs from the React documentation, it's available here. String Refs (deprecated) This is an "older" way...