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

feat: unwrapResponse for custom response handling #11029

Closed
wants to merge 3 commits into from

Conversation

jacob-ebey
Copy link
Member

@jacob-ebey jacob-ebey commented Nov 14, 2023

Currently we handle JSON / text responses in our unwrapping of loader / action return values. We can extend that to the user to allow things, like say, RSC content to be fetched from a server and accessed through useLoaderData().

Copy link

changeset-bot bot commented Nov 14, 2023

🦋 Changeset detected

Latest commit: 646769a

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

This PR includes changesets to release 5 packages
Name Type
@remix-run/router Minor
react-router Patch
react-router-dom Patch
react-router-dom-v5-compat Patch
react-router-native 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

Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

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

LGTM! Let's just confirm the name with @mjackson / @ryanflorence and see if they care to bikeshed at all since this is new public API.

I pushed up one minor change to match the approach used by defaultMapRouteProperties and added a few unit tests

@jacob-ebey jacob-ebey closed this Dec 4, 2023
@jacob-ebey jacob-ebey deleted the unwrap_response branch December 4, 2023 20:28
@brophdawg11
Copy link
Contributor

Replaced by #11086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants