3 posts tagged with "react"

View All Tags

Do you rely on your URL?

Nick Christiansen

Nick Christiansen

Engineering Team Lead

An essential and often forgotten part of state management includes URL design. The benefits of knowing when to use your URL as state, and what state to include in a URL can enable multiple benefits for both user and developer experiences.

For example, you build a brand new feature in your web app, using the latest state management tools. Users can sort it, filter it, paginate it, zoom in, zoom out, and find sweet new operational insights. Now, how do your users share it with everyone so they can see it?... Luckily you have relied on your URL. A simple copy and paste and a user can directly share the exact insight on your new feature.

The Do's and Don'ts of Testing Apollo in React

Adam Hannigan

Adam Hannigan

Engineering Team Lead

As the Apollo ecosystem evolves we find ourselves relying extensively on the underlying functionality it provides. The recent version 3 has highlighted this with the introduction of domain driven type policies and local state management. This enables engineers to consolidate business logic, centralise state and perform advanced data manipulation. However, we now enter dangerous territory where our apps are heavily dependent on external data and the Apollo library.

Writing tests is essential for any Apollo application that aims to be scalable, robust and allows its developers to sleep soundly at night. By harnessing a range of tools you will be able confidently release, ship higher quality code and improve your team’s efficiency.

This article uses Typescript, Apollo version 3 & React Testing Library for examples.

Testing Custom React Hooks With State Machines

Nick Christiansen

Nick Christiansen

Junior Software Engineer

Hi! My name is Nick Christiansen and I am Software Engineer on a Planning & Scheduling team at Assignar. Recently, we started building new React table views to replace existing Angular 1.x tables. Finding the right pattern which will scale, while allowing iteration was both a key objective and a challenge. One of the solutions for this was a custom React hook to manage the table state. To be able to iterate with confidence, without regression, having tests around it was critical. This article will show a simplified example of how we implement tests on our own custom useTable React hook.