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

[Doc] Update Admin and Routing docs to encourage using a Data Router #10220

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

smeng9
Copy link
Contributor

@smeng9 smeng9 commented Sep 18, 2024

Problem

Current docs is outdated, does not work data APIs

React-router recommends user to update to use new API.

Solution

We should let user use warnWhenUnsavedChanges when they perform their setup with latest best practice

How To Test

Describe the steps required to test the changes

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi djhi changed the title [Doc ]update docs related to router to be consistent with migration guide [Doc] Update docs related to router to be consistent with migration guide Sep 18, 2024
@fzaninotto
Copy link
Member

Thanks for your PR.

The current doc mention a way to use a regular router, and it works. It is true that if you want to use an data router, the doc needs to be updated. But I'm not sure that replacing the doc with the data router version is the best thing to do, as the setup is a bit more complicate din this case.

Any second opinion on that?

@slax57
Copy link
Contributor

slax57 commented Oct 7, 2024

@fzaninotto Using a regular router works, sure, except regarding the warnWhenUnsavedChanges feature. This may come as a (bad) suprise to users willing to use that feature in the future.

Hence, I would agree with @smeng9 that it's best to encourage using a data router as soon as possible in the docs, to minimize the chances of users running into the issue of the non-working warnWhenUnsavedChanges feature.

@fzaninotto
Copy link
Member

You've convinced me! Let's merge this.

docs/Routing.md Outdated Show resolved Hide resolved
docs/Routing.md Outdated Show resolved Hide resolved
@slax57 slax57 self-requested a review October 7, 2024 15:38
docs/Routing.md Outdated Show resolved Hide resolved
docs/Routing.md Outdated Show resolved Hide resolved
docs/Routing.md Outdated Show resolved Hide resolved
docs/Admin.md Outdated Show resolved Hide resolved
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

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

Thanks!

docs/Routing.md Outdated Show resolved Hide resolved
docs/Admin.md Outdated Show resolved Hide resolved
docs/Routing.md Outdated Show resolved Hide resolved
docs/Admin.md Outdated Show resolved Hide resolved
@slax57 slax57 added this to the 5.2.3 milestone Oct 8, 2024
@slax57 slax57 merged commit 92c8bc6 into marmelab:master Oct 8, 2024
1 of 2 checks passed
@slax57 slax57 changed the title [Doc] Update docs related to router to be consistent with migration guide [Doc] Update Admin and Router docs to encourage using a Data Router Oct 8, 2024
@slax57 slax57 changed the title [Doc] Update Admin and Router docs to encourage using a Data Router [Doc] Update Admin and Routing docs to encourage using a Data Router Oct 8, 2024
@smeng9 smeng9 deleted the update-create-router branch October 8, 2024 16:44
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

Successfully merging this pull request may close these issues.

3 participants