qmfkdldks / vivid-editor

animated text editor
https://vivid-delta.vercel.app
0 stars 0 forks source link

conditionalComponent hook order changed #44

Closed qmfkdldks closed 3 years ago

qmfkdldks commented 3 years ago

Issue

When chainging animation MODE. This bug appears. Changed from HOVER to Visible.

Warning: React has detected a change in the order of Hooks called by conditionalComponent. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
1. useRef                     useRef
2. useEffect                  useState
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    at conditionalComponent (https://2gtu8.csb.app/node_modules/vivid-editor/dist/index.modern.js:1035:21)
    at Leaf (https://2gtu8.csb.app/node_modules/vivid-editor/dist/index.modern.js:1220:25)
    at Leaf (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:720:14)
    at span
    at Text (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:763:21)
    at Children (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:896:18)
    at p
    at Element (https://2gtu8.csb.app/node_modules/vivid-editor/dist/index.modern.js:1246:25)
    at Element (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:799:18)
    at Children (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:896:18)
    at div
    at Editable (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:1050:19)
    at Slate (https://2gtu8.csb.app/node_modules/slate-react/dist/index.es.js:516:16)
    at Ge (https://2gtu8.csb.app/node_modules/styled-components/dist/styled-components.browser.esm.js:566:38)
    at VividEditor (https://2gtu8.csb.app/node_modules/vivid-editor/dist/index.modern.js:1615:27)
    at div
    at App