expo icon indicating copy to clipboard operation
expo copied to clipboard

fix(router): accept options function

Open vilnytskyi opened this issue 1 year ago • 1 comments

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).

vilnytskyi avatar Jun 29 '24 00:06 vilnytskyi

@marklawlor I installed 3.5.18(with expo 51.0.21) and this change seems reverted.

rarira avatar Jul 22 '24 09:07 rarira