Jake Trent

Tag: Js

How to Choose a Key in React

The React prop of key is a special attribute that’s used by the library to keep track of nodes within a list. There are a few guidelines that can help in selecting an appropriate key value.

Read more

Event Handler Naming in React

Naming’s a hard problem, right? Well, coming up with the names can be hard. After that, it’s just a simple matter of typing. Here are a few of my naming conventions for React or even handling in general.

Read more

Pause in Redux Saga

Your code running too fast? Do you just want a timing offset for some reason? If you have a long-running, complicated action that you’re running already, it’s likely you’re using the fantastic redux-saga. Here’s a way to pause execution with a redux-saga-managed action.

Read more

Debug.log in Elm Pipes

There aren’t many functions in the standard lib for elm that create side effects. Elm’s Debug.log is one of those exceptions. It logs to the console. Here’s how it’s setup to make console logging whilst piping easier that patting your head whilst rubbing your tummy.

Read more

Handle Errors in a Node App

As with any software, here you can expect the unexpected. Node apps experience errors as well. Let’s say that an error crops in our Node API – what should we do about it?

Read more

Return an Array in GraphQL

GraphQL provides a query language to define the shape of data you’d like returned from an HTTP API on a server and a library to help make it happen. It’s easy to return a single item or multiple items.

Read more

Testing es2015 Riot Tags

Getting riot.js setup for development isn’t too bad. But the combo of language features, testing tools, and riot templates made setting up the test environment a bit trickier than I expected. Here are some of the details.

Read more
Older