React onblur?

Hi, I’m totally new to ProseMirror, like today new.

In current React solution, I have slow performance in huuuge articles with hundreds of blocks. The problem is with how React states work.

So I’m now trying @handlewithcare/react-prosemirror.

<ProseMirror
            dispatchTransaction={(tr) => {
                setEditorState((s) => s.apply(tr));
            }}

The code above means that it changes state after every key press and re-renders big chunk of content. When you have a really long article, this means that you write a word and watch how single characters are added quite slowly.

But I don’t need the updated state after each character. I only need the result. It would be nice to have an event like “onBlur” where I would have the result state. But <ProseMirror> doesn’t have any similar props.

Can anyone help me with this? Maybe someone has completely different approach in solving this problem.

Hi there! Let’s move this conversation to GitHub - handlewithcarecollective/react-prosemirror: A library for safely integrating ProseMirror and React. — that project isn’t maintained by Marijn and I don’t want to clutter up his discussion forums!