Cannot read property 'refinementList' of undefined error randomly in react application

hello all,
I am getting Uncaught TypeError: Cannot read property 'refinementList' of undefined error randomly while navigating. I am sure that it is from algolia/react-instantsearch library. I am not able to track why it occuring. Please help.