Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed May 16, 2024
2 parents d8ec4bb + 5164381 commit 841e1b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import './global.module.scss';
import 'static/fonts/floweditor/style.css';

import FlowEditor from 'components';
import React, { useRef } from 'react';
import React from 'react';
import ReactDOM from 'react-dom';

import * as serviceWorker from './serviceWorker';
Expand All @@ -28,8 +28,8 @@ window.showFlowEditor = (ele, config) => {
concatSCHEMES(config.schemes);
}
//<*((==< return the instance reference
const theFlowEditor = useRef(null);
ReactDOM.render(<FlowEditor config={config} ref={{ theFlowEditor }} />, ele);
let theFlowEditor;
ReactDOM.render(<FlowEditor config={config} ref={el => (theFlowEditor = el)} />, ele);
return theFlowEditor;
};

Expand Down

0 comments on commit 841e1b2

Please sign in to comment.