I have three files: App.js, A.js and B.js. A and B are functional components which are used in App.js. Within A.js I have a function foo(), and within this function I want to force B.js to re-render.
Any idea how to do this?
I googled this problem and found out that I could set a state in B.js and update that state. But how can I update this external state from foo() in A.js?