Open a modal of another class POO React

0

I'm learning JavaScript and POO so I can be doing some bullshit, I'm trying to make a navbar and that navbar open different functions of different classes in other files.

This part where you have the return arrow, the text 'products' and the icons is the header: link The rest, down the formProduct page

Full Code:

src / components / Header / index.js: link

src / pages / formProduct / index.js: link

The way I did it I can execute the function hi, which takes a state and an alert on the screen, but I can not execute the .new function that opens a modal to create a new product ... Why? / p>

In the case, in the header (src / components / Header / index.js), at line 173, I can use:

<Ionicon icon="md-add-circle" fontSize="35px" color="#0069d9" onClick={ products.oi } />

But I can not use:

<Ionicon icon="md-add-circle" fontSize="35px" color="#0069d9" onClick={ products.new } />

Why? What am I doing wrong?

    
asked by anonymous 05.01.2019 / 20:06

0 answers