Skip to content

Commit

Permalink
Move hydrateApp to @mfng/core/client/browser
Browse files Browse the repository at this point in the history
This is imported from the client/browser entry, so it should be in
`@mfng/core/client/browser`, and not in `@mfng/core/client`. The latter
has modules that can used in both, the SSR and browser client. Since
`Router` is also imported through the same barrel file, we can remove
the `'use client'` directive from it.

Continuation from #53 and #54
  • Loading branch information
unstubbable committed Mar 14, 2024
1 parent 88c81c1 commit e0fc39b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/aws-app/src/client.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {hydrateApp} from '@mfng/core/client';
import {hydrateApp} from '@mfng/core/client/browser';
// eslint-disable-next-line import/no-extraneous-dependencies
import 'tailwindcss/tailwind.css';

Expand Down
2 changes: 1 addition & 1 deletion apps/cloudflare-app/src/client.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {hydrateApp} from '@mfng/core/client';
import {hydrateApp} from '@mfng/core/client/browser';
// eslint-disable-next-line import/no-extraneous-dependencies
import 'tailwindcss/tailwind.css';

Expand Down
2 changes: 1 addition & 1 deletion apps/vercel-app/src/client.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {hydrateApp} from '@mfng/core/client';
import {hydrateApp} from '@mfng/core/client/browser';
// eslint-disable-next-line import/no-extraneous-dependencies
import 'tailwindcss/tailwind.css';

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/client/browser.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './call-server.js';
export * from './hydrate-app.js';
export * from './router.js';
1 change: 0 additions & 1 deletion packages/core/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './hydrate-app.js';
export * from './link.js';
export * from './use-router.js';
2 changes: 0 additions & 2 deletions packages/core/src/client/router.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import * as React from 'react';
import type {RouterLocation} from '../use-router-location.js';
import {createUrl, createUrlPath} from './router-location-utils.js';
Expand Down

0 comments on commit e0fc39b

Please sign in to comment.