jaredreich / jaredreich/pell

Update React example to use React.createRef

Open
#156 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12k
Forks
546
PR merge metrics
No merged PRs in 30d

Description

```jsx
import 'pell/dist/pell.css'
import React, { Component } from 'react';
import { init } from 'pell';

export default class App extends Component {
state = { html: null }
root = React.createRef()

componentDidMount () {
this.editor = init({
element: this.root.current,
onChange: html => this.setState({ html }),
actions: ['bold', 'underline', 'italic'],
})
}

render() {
return (


Editor:



HTML Output:


{this.state.html}


);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the React example shown in the issue and compare its ref setup with the requested React.createRef usage. Verify that the example still mounts the pell editor and displays the generated HTML after the update.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.