I always got this error TypeError: Cannot read property 'error' of undefined, but it work fine on the other stand-alone component tho.Could you help me with it, thank you.
I think it's because now my react page has a whole bunch of Task component that has the same toastrContainer ref...
I have a component name
Tasks
, inside that component, I render a lot of same components namedTask
.I put this code:
Inside of the
Task
component, but each time I call the toastr:I always got this error
TypeError: Cannot read property 'error' of undefined
, but it work fine on the other stand-alone component tho.Could you help me with it, thank you.I think it's because now my react page has a whole bunch of
Task
component that has the sametoastrContainer
ref...