First published in the Language finch documentation

The GGEditor component context concept comes from the gg-Editor document, but it’s actually the React ref, which contains all the properties and methods of the GGEditor component as an instance.

Fetch by ref

Here’s how I got it

class App extends Component {
  componentDidMount() {
    console.log(this.editorRef);
  }
  
  editorRef = React.createRef();

  render() {
    <GGEditor ref={this.editorRef}>.</GGEditor>}}Copy the code

Print and have a look at the results:



We can use this to find apis in gg-Editor that you haven’t found yet