Tangible Bytes

A Web Developer’s Blog

Vitest Partial Mock InertiaJs

I have a Laravel project using vite InertiaJS and React

A unit test calling the Head module from @inertiajs/react

Was triggering this error

Cannot read properties of undefined (reading 'createProvider')

For this test I don’t really care about the Head module - but didn’t want to try and mock the whole of inertia-react

Read more ...

Install Reactjs

I’ve been writing software for long enough to know that it pays to be careful at the start. You don’t always know when you’ll be supporting a project long term and may need to upgrade versions of your framework and related tools.

These are my notes of starting to use React with an eye to long term support.

Read more ...