Access function from another Component using ref (TypeScript)

about 2 years ago - Direct link

I'm not sure if this is possible on functional components. But back when I was still using Class Based Components, I was able to access functions inside another class, just by using refs.

class ParentComponent extends Component {

onCLick() = {

render() {
return (


class ChildComponent extends Component {

childFunction() {
//... do something

How can I do this using functional components and w/ TypeScript?

Go to article →