goToNextChunk in @codemirror/merge

I am trying to implement goToNextChunk in merge diff view. However, I am clueless on how to proceed.
The doc says the method expects an object with state and dispatch properties. I am not getting both of them if I use ref to store the codemirror instance.

I have an example at React (forked) - StackBlitz

Pass it your EditorView object.

I have 2 EditorView objects, one for Original and one for Modified as you can see in the code I attached. That is why I am confused on how to use it

Use it on the one where you want to move the selection. Possibly the one that has focus.

Ok, So I tried to add a ref to one of the editors in the merge view. Its always null. Do you have any working example I can take a look at?

I was able to pass the editorview to goToNextChunk.

But I get this error

TypeError: Cannot read properties of undefined (reading ‘field’)