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

Add type deprecations for types now in React Router #5679

Merged
merged 8 commits into from Mar 21, 2023

Conversation

brophdawg11
Copy link
Contributor

  • Where possible, use React Router types directly
  • Where we differ slightly in implementation or naming, deprecate the Remix type in favor of the React Router type

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2023

🦋 Changeset detected

Latest commit: 503cc2d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/react Patch
@remix-run/server-runtime Patch
@remix-run/testing Patch
@remix-run/cloudflare Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/node Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
create-remix Patch
@remix-run/css-bundle Patch
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/vercel Patch
@remix-run/serve Patch
remix Patch
@remix-run/eslint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines -64 to -67
let headers = new Headers(responseInit.headers);
if (!headers.has("Content-Type")) {
headers.set("Content-Type", "application/json; charset=utf-8");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jacob-ebey I think this was only here from a copy/paste and eventually gets overwritten with text/remix-deferred anyway. So we can just use the router defer verbatim (while keeping the return type casting)?

Copy link
Member

Choose a reason for hiding this comment

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

That should be fine.

}) {
return <h1>Not Implemented!</h1>;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No longer used

...responseInit,
headers,
});
return routerJson(data, init);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use router methods directly, but preserve typecasting on the returned values

@brophdawg11 brophdawg11 merged commit fcf4862 into dev Mar 21, 2023
9 checks passed
@brophdawg11 brophdawg11 deleted the brophdawg11/v1-rr-type-deprecations branch March 21, 2023 18:54
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Mar 21, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-d6c9737-20230322 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

lpsinger added a commit to lpsinger/remix-utils that referenced this pull request Apr 13, 2023
Since remix-run/remix#5679 and remix v1.15.0, RouteData is no
longer exported by Remix. The type is now provided by
`@remix-run/router`.
lpsinger added a commit to lpsinger/remix-utils that referenced this pull request May 11, 2023
Since remix-run/remix#5679 and remix v1.15.0, RouteData is no
longer exported by Remix. The type is now provided by
`@remix-run/router`.
lpsinger added a commit to lpsinger/remix-utils that referenced this pull request May 11, 2023
Since remix-run/remix#5679 and remix v1.15.0, RouteData is no
longer exported by Remix. The type is now provided by
`@remix-run/router`.
lpsinger added a commit to lpsinger/remix-utils that referenced this pull request Jul 4, 2023
Since remix-run/remix#5679 and remix v1.15.0, RouteData is no
longer exported by Remix. The type is now provided by
`@remix-run/router`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed and will be released soon CLA Signed package:server-runtime renderer:react
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants