You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line here means that a new class will be constructed on every component re-render. I'm not sure how expensive that is in reality, but it's an easy fix:
The text was updated successfully, but these errors were encountered:
brendanmc6
changed the title
@safe-apps-react-sdk - do not initialize new SDK class on ever render
@safe-apps-react-sdk - do not initialize new SafeAppsSDK class on every render
May 8, 2021
https://github.com/gnosis/safe-apps-sdk/blob/master/packages/safe-apps-react-sdk/src/index.tsx#L18
This line here means that a new class will be constructed on every component re-render. I'm not sure how expensive that is in reality, but it's an easy fix:
https://reactjs.org/docs/hooks-reference.html#lazy-initial-state
The text was updated successfully, but these errors were encountered: