Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content not updated from the parent #2253

Open
nappalm opened this issue May 10, 2024 · 0 comments
Open

Content not updated from the parent #2253

nappalm opened this issue May 10, 2024 · 0 comments
Labels
type: bug 🪲 Something isn't working

Comments

@nappalm
Copy link

nappalm commented May 10, 2024

Summary

I have run into a problem with useRemirror, when a user changes page the content is different, however, remirror stays with the latest version 1 and when switching to 3 it stays with version 2, so on and so forth, offset by 1.

Steps to reproduce

export default function NoteEditor({ content}) {
 console.log({content}); // 🗨️ the content arrives for sure, but useRemirror never changes it

  const {manager, state, onChange} = useRemirror({
    extensions,
    content,
    selection: 'start',
    stringHandler: 'html',
  })
  const notes = useSelector(selectNotes);
  const content = JSON.parse(notes.current?.content) : '';

return (
<NoteEditor content={content} />
)
@nappalm nappalm added the type: bug 🪲 Something isn't working label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant