Apollo Client local cache is powerful, but complex. Utilizing custom React hooks and Apollo Client cache simplifies the interphase and makes data fetching more effective.
Following a well-defined pattern for my web app acceptance test suite has helped me write tests quicker and clearly document the software's capabilities.
Writing quality software takes a lot of skills, and it can be overwhelming to decide which ones to focus on first. Here's what I've appreciated the most.
SQL queries dangerously couple software to the persistence layer. And as they grow in size, they capture more complexity—I've even found myself embedding key business rules.
To manage our data loaders, we've been experimenting with storing our data loaders in an "app context" object that's passed around our server-side code.
We use Sinon to mock Typescript modules by using mockModule to create a function that can mock the given module. This is done at the outer-most scope of our test suite so that this
liftP is a higher-order JavaScript function that takes a function as a parameter and returns a new function that is “lifted” into a promise. It allows me to design functions withou