diff --git a/src/Icons.jsx b/src/Icons.jsx index 0a58412..0b2fcbf 100644 --- a/src/Icons.jsx +++ b/src/Icons.jsx @@ -1,4 +1,4 @@ -import React from 'preact/compat'; +import React from 'react'; /** * Icon from IcoFont https://icofont.com/, licensed under the CC BY 4.0 license. diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 7c48efe..bfaac0a 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -1,5 +1,4 @@ -import React from 'preact/compat'; -import { useState, useRef, useEffect } from 'preact/hooks'; +import React, { useState, useRef, useEffect } from 'react'; import { getWidget, DEFAULT_WIDGETS } from './widgets'; import { TrashIcon } from '../Icons'; import setPosition from './setPosition'; diff --git a/src/editor/useClickOutside.js b/src/editor/useClickOutside.js index ff662b6..a7b9c50 100644 --- a/src/editor/useClickOutside.js +++ b/src/editor/useClickOutside.js @@ -1,4 +1,4 @@ -import { useEffect } from 'preact/hooks'; +import { useEffect } from 'react'; export default function useClickOutside(ref, callback) { diff --git a/src/editor/widgets/WrappedWidget.jsx b/src/editor/widgets/WrappedWidget.jsx index 19ca452..4c1a184 100644 --- a/src/editor/widgets/WrappedWidget.jsx +++ b/src/editor/widgets/WrappedWidget.jsx @@ -1,4 +1,4 @@ -import React, { Component } from 'preact/compat'; +import React, { Component } from 'react'; export default class WrappedWidget extends Component { diff --git a/src/editor/widgets/comment/Comment.jsx b/src/editor/widgets/comment/Comment.jsx index 7667307..cc9b9dc 100644 --- a/src/editor/widgets/comment/Comment.jsx +++ b/src/editor/widgets/comment/Comment.jsx @@ -1,5 +1,4 @@ -import React from 'preact/compat'; -import { useState } from 'preact/hooks'; +import React, { useState } from 'react'; import TimeAgo from 'timeago-react'; import DropdownMenu from './DropdownMenu'; import TextEntryField from './TextEntryField'; diff --git a/src/editor/widgets/comment/CommentWidget.jsx b/src/editor/widgets/comment/CommentWidget.jsx index dd737f8..5254bd0 100644 --- a/src/editor/widgets/comment/CommentWidget.jsx +++ b/src/editor/widgets/comment/CommentWidget.jsx @@ -1,4 +1,4 @@ -import React from 'preact/compat'; +import React from 'react'; import Comment from './Comment'; import TextEntryField from './TextEntryField'; import i18n from '../../../i18n'; diff --git a/src/editor/widgets/comment/DropdownMenu.jsx b/src/editor/widgets/comment/DropdownMenu.jsx index 86b4da8..43903f5 100644 --- a/src/editor/widgets/comment/DropdownMenu.jsx +++ b/src/editor/widgets/comment/DropdownMenu.jsx @@ -1,5 +1,4 @@ -import React from 'preact/compat'; -import { useRef } from 'preact/hooks'; +import React, { useRef } from 'react'; import useClickOutside from '../../useClickOutside'; import i18n from '../../../i18n'; diff --git a/src/editor/widgets/comment/PurposeSelect.jsx b/src/editor/widgets/comment/PurposeSelect.jsx index 64f44ce..ec9d803 100644 --- a/src/editor/widgets/comment/PurposeSelect.jsx +++ b/src/editor/widgets/comment/PurposeSelect.jsx @@ -1,4 +1,4 @@ -import React from 'preact/compat'; +import React from 'react'; import Select from 'react-select'; export const PURPOSES = [ diff --git a/src/editor/widgets/comment/TextEntryField.jsx b/src/editor/widgets/comment/TextEntryField.jsx index b1e3ae1..1585ea0 100644 --- a/src/editor/widgets/comment/TextEntryField.jsx +++ b/src/editor/widgets/comment/TextEntryField.jsx @@ -1,4 +1,4 @@ -import React, { Component } from 'preact/compat'; +import React, { Component } from 'react'; import TextareaAutosize from 'react-autosize-textarea'; import i18n from '../../../i18n'; diff --git a/src/editor/widgets/index.jsx b/src/editor/widgets/index.jsx index f598bdf..d528f1b 100644 --- a/src/editor/widgets/index.jsx +++ b/src/editor/widgets/index.jsx @@ -1,14 +1,16 @@ import React from 'react'; +import ReactDOM from 'react-dom'; import CommentWidget from './comment/CommentWidget' import TagWidget from './tag/TagWidget'; import WrappedWidget from './WrappedWidget'; /** - * We'll add React to the global window, so that + * We'll add React and ReactDOM to the global window, so that * plugins can use it without re-bundling. Also, * without this, hooks won't work! */ window.React = React; +window.ReactDOM = ReactDOM; /** Standard widgets included by default **/ const BUILTIN_WIDGETS = { diff --git a/src/editor/widgets/tag/TagWidget.jsx b/src/editor/widgets/tag/TagWidget.jsx index 461cfa5..289323c 100644 --- a/src/editor/widgets/tag/TagWidget.jsx +++ b/src/editor/widgets/tag/TagWidget.jsx @@ -1,5 +1,4 @@ -import React from 'preact/compat'; -import { useState } from 'preact/hooks'; +import React, { useState } from 'react'; import { CSSTransition } from 'react-transition-group'; import { CloseIcon } from '../../../Icons'; import i18n from '../../../i18n';