Write a custom useLocalStorage hook that syncs state with localStorage. It should work like useState but persist the value across page reloads.
Click Run to test your code