Skip to content

feat: mutable route tree #9996

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

Merged
merged 12 commits into from
Feb 21, 2023
5 changes: 5 additions & 0 deletions .changeset/quick-yaks-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/router": patch
---

Add internal API for custom HMR implementations
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
},
"filesize": {
"packages/router/dist/router.umd.min.js": {
"none": "41.5 kB"
"none": "41.6 kB"
},
"packages/react-router/dist/react-router.production.min.js": {
"none": "13 kB"
Expand Down
3 changes: 3 additions & 0 deletions packages/react-router-dom/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ export function createStaticRouter(
},
_internalFetchControllers: new Map(),
_internalActiveDeferreds: new Map(),
_internalSetRoutes() {
throw msg("_internalSetRoutes");
},
};
}

Expand Down
5 changes: 2 additions & 3 deletions packages/react-router/__tests__/data-memory-router-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ describe("<DataMemoryRouter>", () => {
initialEntries={["/foo"]}
hydrationData={{
loaderData: {
layout: null,
foo: "FOO",
},
}}
Expand Down Expand Up @@ -861,7 +860,7 @@ describe("<DataMemoryRouter>", () => {
}

expect(spy).toHaveBeenCalledWith({
layout: null,
layout: undefined,
foo: "FOO",
bar: undefined,
child: undefined,
Expand Down Expand Up @@ -896,7 +895,7 @@ describe("<DataMemoryRouter>", () => {
</div>"
`);
expect(spy).toHaveBeenCalledWith({
layout: null,
layout: undefined,
foo: undefined,
bar: undefined,
child: "CHILD",
Expand Down
Loading