Skip to content

Instantly share code, notes, and snippets.

View wagnerpaz's full-sized avatar

Wagner Paz wagnerpaz

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