I'm working on a React-Flow project. I'm changing the layout of the nodes and edges with a button and I want the last thing to happen to be resetting the viewport to be centered (so just fitView).
How can I do this?
I've tried calling fitView() again but this doesn't seem to work at all.
I have seen this pattern on the official documentation