Skip to content

Commit ed58642

Browse files
committed
fix: remove dependency array from comments re-rendering
1 parent d192b37 commit ed58642

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

packages/react/src/components/Comments/Comment.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,17 @@ export const Comment = ({
5151

5252
const dict = useDictionary();
5353

54-
const commentEditor = useCreateBlockNote(
55-
{
56-
initialContent: comment.body,
57-
trailingBlock: false,
58-
dictionary: {
59-
...dict,
60-
placeholders: {
61-
emptyDocument: dict.placeholders.edit_comment,
62-
},
54+
const commentEditor = useCreateBlockNote({
55+
initialContent: comment.body,
56+
trailingBlock: false,
57+
dictionary: {
58+
...dict,
59+
placeholders: {
60+
emptyDocument: dict.placeholders.edit_comment,
6361
},
64-
schema: editor.comments.commentEditorSchema || defaultCommentEditorSchema,
6562
},
66-
[comment.body],
67-
);
63+
schema: editor.comments.commentEditorSchema || defaultCommentEditorSchema,
64+
});
6865

6966
const Components = useComponentsContext()!;
7067

0 commit comments

Comments
 (0)