Skip to content

Instantly share code, notes, and snippets.

Avatar

Wagner Paz wagnerpaz

View GitHub Profile
@wagnerpaz
wagnerpaz / App.js
Created Mar 30, 2020
How to expose a react component functions using forwardRef and useRefs.
View App.js
import React, { useRef } from 'react';
import Counter from './components/Counter';
export default () => {
const counterRef = useRef(null);
return (
<fieldset>
<legend>App.js</legend>