Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Expo Router on Web caused by EventProvider in Layout #374

Open
60pfennig opened this issue Nov 7, 2024 · 0 comments
Open

Error in Expo Router on Web caused by EventProvider in Layout #374

60pfennig opened this issue Nov 7, 2024 · 0 comments

Comments

@60pfennig
Copy link

Only on Web, Android working. Tested other Providers which are working fine so the cause seems to be the Event Provider.
If you wrap your navigator in your _layout.tsx like this:

const Layout = () => {
  return (
    <EventProvider>
      <Stack>
        <Stack.Screen name="individual" options={{ headerShown: false }} />
        <Stack.Screen name="group" options={{ headerShown: false }} />
      </Stack>
    </EventProvider>
  );
};


export default Layout;

You get:

Uncaught Error: <Screen /> component in `default export` at `app/report/_layout` must not have a `children`, `component`, or `getComponent` prop when used as a child of a Layout Route

    withLayoutContext.js:21
    React 4
    useFilterScreenChildren withLayoutContext.js:14
    React 3
    useFilterScreenChildren withLayoutContext.js:12
    Navigator withLayoutContext.js:54
    React 13
    withLayoutContext.js:21:30
    withLayoutContext.js:21
    React 4
    useFilterScreenChildren withLayoutContext.js:14
    React 3
    useFilterScreenChildren withLayoutContext.js:12
    Navigator withLayoutContext.js:54
    React 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant