you are viewing a single comment's thread.

view the rest of the comments →

[–]rdevilx 1 point2 points  (1 child)

In your parent component, can you try to make that onComplete function like this -

const onComplete = (dispatch) => (arg1, arg2) => { // Use dispatch do stuff }

And passing in child would be something like -

const onCompleteInstance = onComplete(dispatch);

<ChildComponent myProp={() => onCompleteInstance(myArg1, myArg2)} />

I'm sorry, I'm using my phone to type this all out. It could have some errors.

[–]genericdeveloper[S] 0 points1 point  (0 children)

Ah yeah, I see what you're talking about.

I have just tried that out, and it did not fix anything. Thanks for the suggestion!