Skip to content

Commit

Permalink
Default export is required
Browse files Browse the repository at this point in the history
In my testing having a non-default export:

```jsx
export function ComponentName() {}
```

Results in the route not being found. (goes to the catch-all)

Therefore, I'm suggesting replacing "should" with "must".
  • Loading branch information
klequis authored and atilafassina committed Jun 5, 2024
1 parent 99705e5 commit d6e4b65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ When a file is named `index`, it will be rendered when there are no additional U
- `example.com``/routes/index.tsx`
- `example.com/socials``/routes/socials/index.tsx`

For a route to be rendered as a page, it should default export a component.
For a route to be rendered as a page, it must default export a component.
This component represents the content that will be rendered when users visit the page:

```tsx filename="routes/index.tsx"
Expand Down

0 comments on commit d6e4b65

Please sign in to comment.