https://usehooks.com/useLocalStorage/ has a safer implementation and is free to copy (Unlicense).
For projects like Blender, where development is a self-reinforcing ecosystem I appreciate what the GPL does, here not so much.
It's true that most folks probably would do their own implementation of this and the GPL license would be a non-starter for most projects, but if it suits your needs and you've learned something in the process, more power to you. :)
This is a few lines of pretty trivial code
"Two wrongs don't make a right"