software-mansion/react-freeze

How to implement this correctly?

swizes opened this issue · 1 comments

If I add the code below into my index.js in react-native, is it going to work as intended for the screens which are deep in stack hierarchy?

import { enableFreeze } from "react-native-screens";

enableFreeze(true);

Or do i need apply the usage below on every screen

function SomeComponent({ shouldSuspendRendering }) {
  return (
    <Freeze freeze={shouldSuspendRendering}>
      <MyOtherComponent />
    </Freeze>
  );
}

Enablefreeze should be enough for navigation