Avoid removing navigate from route loader
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
Currently the "navigate" property is marked as deprecated on the loader and it is advised to use throw redirect() instead. However I think this is a bug because there's a hug difference --> when we throw, we can not return loaded date from a root route while with the navigate property we get exactly this, we can navigate to a sub route after having loaded some data and return the actually loaded data so I think we need both features.
Your Example Website or App
https://stackoverflow.com/help/mcve
Steps to Reproduce the Bug or Issue
See the navigate property of the loader properties marked as deprecated
Expected behavior
Should not be marked deprecated and not be removed because it serves a completely different purpose than the throw redirect()
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: Latest
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the loader API definition and the deprecation for its navigate property, then compare its behavior with throw redirect(). Done means the navigate property remains available without deprecation while preserving loaded data from a root route; add or update coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100