BiblioNexus-Foundation / scripture-editors

Monorepo for various Scripture editors
MIT License
3 stars 1 forks source link

Uncontrolled Scripture data property #44

Closed irahopkinson closed 7 months ago

irahopkinson commented 8 months ago

The nature of an editor means it's meant to be an uncontrolled React component since edits don't need to fire a re-render since Lexical has its own editor state and takes care of rendering the edits. See end of this page in Lexical Docs:

"Lexical is generally meant to be uncontrolled..."

A React component can have controlled and uncontrolled properties. See React Docs:

"You can combine refs and state in a single component."

When loading the whole book of Psalms, the render takes ~1.8s. Typing a single character and then waiting for 1.8s before you can type the next character is not practical (which is likely as a controlled React component). What is the best practice when using Lexical?

This is a BREAKING CHANGE.