slate-test-utils
slate-test-utils copied to clipboard
Cannot add property deleteBackward, object is not extensible when creating editor
Thanks for this library - feels like it could be the solution to so many problems ! I'm having trouble getting a minimal test setup with an editor.
When I create the editor using withHistory(withReact(mockEditor ?? createEditor())
I end up getting the error TypeError: Cannot add property deleteBackward, object is not extensible
Any idea what might be happening there ?
Versions: React: 17.0.2 Slate: 0.78.0 Slate-React: 0.79.0
I'm not entirely clear on why this is the case but it looks like maybe this is something to do with React 17
Adding /** @jsxRuntime classic */
above /** @jsx jsx */
seemed to resolve this for me.
@mwood23 I'm not sure if this is worth adding to the comment around using with React 17 ? Happy to PR if it is !
Im having this same issue with similar versions, but the classic runtime setting isnt working for me...