wrappid / core

This is a Wrappid package repository that contains core functionalities of Wrappid Framework that enables users to use Wrappid's core features and components.
MIT License
10 stars 4 forks source link

fix(core): :bug: maximum update depth exceeded in PageContainer.js #220

Closed chirag-uemk closed 1 month ago

chirag-uemk commented 1 month ago

returning an empty object when a state is not returned seems to fix the problem

wrappid/core#219

A solution to the issue was found in changing the following line in Line 29 of PageContainer.js :

const { uid, sessionExpired, sessionDetail } = useSelector((state) => state.auth );

The code can be changed to :

const { uid, sessionExpired, sessionDetail } = useSelector((state) => state?.auth || {});

Returning an empty object when a state is not returned seems to fix the problem.