This simple implementation of React.CreateRef in StencilJS app.
npm install stencil-createrefThis simple code adds the same functionality as React.CreateRef to StencilJS app.
CreateRef facilitates the association of an HTML element within the component.
```
npm i stencil-createref
`tsx
import { createRef } from 'stencil-createref'
@Component({
tag: 'my-component',
styleUrl: 'my-component.css'
})
class MyComponent {
textInput = createRef
focusTextInput = () => {
this.textInput.current.focus();
}
render() {
return (
type="button"
value="Focus the text input"
onClick={this.focusTextInput}
/>