As per @tkdodo advice at https://twitter.com/tkdodo/status/1577709398314590213 Look in to using useSyncExternalSource instead of writing to refs and forcing updates