expo
expo copied to clipboard
fix(router): accept options function
Why
TypeScript is currently prohibiting usage of options prop as a function, to configure options depending on route instance. Note that it's solely typing issue, the library itself supports it (see useScreens.tsx)
How
Adjusted type according to original @react-navigation/core types
Test Plan
Verified that typing works correctly when passing both object & function props.
Checklist
- [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md).
- [ ] Conforms with the Documentation Writing Style Guide
- [ ] This diff will work correctly for
npx expo prebuild& EAS Build (eg: updated a module plugin).
@marklawlor I installed 3.5.18(with expo 51.0.21) and this change seems reverted.