Skip to content

Commit

Permalink
Document work-around for strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w committed Feb 16, 2023
1 parent e22d017 commit f96f4ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
reactStrictMode: false,
reactStrictMode: true,
basePath: "/mathquill4quill/nextjs"
};
6 changes: 5 additions & 1 deletion nextjs/src/QuillEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ class QuillEditor extends React.Component {
super(props);
this.reactQuill = React.createRef();
this.attachQuillRefs = this.attachQuillRefs.bind(this);
this.didAttachQuillRefs = false;
}

componentDidMount() {
this.attachQuillRefs();
if (!this.didAttachQuillRefs) {
this.attachQuillRefs();
this.didAttachQuillRefs = true;
}
}

attachQuillRefs() {
Expand Down

0 comments on commit f96f4ab

Please sign in to comment.