Skip to content

Conversation

msutkowski
Copy link
Contributor

This slightly modifies the error message for silly people like me that might see this, which would also be an error:

image

This would show if you were in the middle of a v5->6 migration and had this:

<Routes> <Route to="/" element={<SomeSectionWithLotsOfNestedRoutes />} /> </Routes>

As an aside, it might make sense to do toMatchInlineSnapshot checks of the consoleWarn in the test to cover both of these cases.

@msutkowski msutkowski changed the base branch from main to dev November 4, 2021 06:34
@mjackson
Copy link
Member

mjackson commented Nov 4, 2021

👍 I’d definitely support adding some inline snapshot tests of the two different cases. Would you like to add that to this PR @msutkowski ?

@msutkowski
Copy link
Contributor Author

+1 I’d definitely support adding some inline snapshot tests of the two different cases. Would you like to add that to this PR @msutkowski ?

Will do! I'll tack that on shortly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just tell them to use <Route path="*"> instead of <Route path="/*">.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@msutkowski msutkowski force-pushed the update-error-message branch from 05b3b52 to a43e627 Compare November 6, 2021 04:51
@ryanflorence ryanflorence merged commit 38933fc into remix-run:dev Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants