Skip to content

Commit

Permalink
docs: small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Aug 19, 2023
1 parent 3447963 commit 4712c81
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/file-conventions/-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "*.client.ts extension"

# `*.client.ts`

While uncommon, you may have a file or dependency that needs uses module side-effects in the browser. You can use `*.client.ts` on file names to force them out of server bundles.
While uncommon, you may have a file or dependency that uses module side effects in the browser. You can use `*.client.ts` on file names to force them out of server bundles.

```ts filename=feature-check.client.ts
// this would break the server
Expand All @@ -22,6 +22,6 @@ console.log(supportsVibrationAPI);
// client: true | false
```

See [Route Module][routemodule] for more information.
See [Route Module][route-module] for more information.

[routemodule]: ../route/route-module
[route-module]: ../route/route-module
6 changes: 3 additions & 3 deletions docs/file-conventions/-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: "*.server.ts extension"

# `*.server.ts`

While not always necessary, you can use `*.server.ts` on file names to force them out of client bundles. Usually the compiler is fine, but if you've got a server dependency with module side-effects, move it into a `your-name.server.ts` file to ensure it is removed from client bundles.
While not always necessary, you can use `*.server.ts` on file names to force them out of client bundles. Usually the compiler is fine, but if you've got a server dependency with module side effects, move it into a `your-name.server.ts` file to ensure it is removed from client bundles.

See [Route Module][routemodule] for more information.
See [Route Module][route-module] for more information.

[routemodule]: ../route/route-module
[route-module]: ../route/route-module
4 changes: 2 additions & 2 deletions docs/file-conventions/entry.client.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ toc: false

By default, Remix will handle hydrating your app on the client for you. If you want to customize this behavior, you can run `npx remix reveal` to generate a `app/entry.client.tsx` (or `.jsx`) that will take precedence. This file is the entry point for the browser and is responsible for hydrating the markup generated by the server in your [server entry module][server-entry-module], however you can also initialize any other client-side code here.

Typically this module uses `ReactDOM.hydrateRoot` to hydrate the markup that was already generated on the server in your [server entry module][server-entry-module].
Typically, this module uses `ReactDOM.hydrateRoot` to hydrate the markup that was already generated on the server in your [server entry module][server-entry-module].

Here's a basic example:

```tsx
```tsx filename=app/entry.client.tsx
import { RemixBrowser } from "@remix-run/react";
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
Expand Down
2 changes: 1 addition & 1 deletion docs/start/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To that end, please keep in mind [our code of conduct][our-code-of-conduct].

- [Moulton][moulton] - Community Remix newsletter

- [Releases on GitHub][releases-on-git-hub] - Not a bad idea to subscribe to Remix releases so you know what's coming.
- [Releases on GitHub][releases-on-git-hub] - Not a bad idea to subscribe to Remix releases, so you know what's coming.

[our-code-of-conduct]: https://github.com/remix-run/remix/blob/main/CODE_OF_CONDUCT.md
[remix-discord-server]: https://rmx.as/discord
Expand Down

0 comments on commit 4712c81

Please sign in to comment.