How to call child method from parent in react

We usually pass the props to the child component from parent and pass notifications to parent by events. But sometimes we have some abnormal cases that we need to call the child method from the parent. In this, we could use Refs in React for solving.

How to handle expired token in javascript?

We often have to work with so many different APIs in a project so what if we are currently calling all three APIs at once and the token expires?
Then all three API requests will call for a token refresh, but only one API will call the token refresh successfully and the other two APIs will fail because the token refresh mechanism will cancel the expiring token as soon as it is refreshed.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×