Skip to content

Commit 7075f7e

Browse files
authored
Update 01_serversiderendering.md
1 parent 6996a13 commit 7075f7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/overmind-website/guides/pro/01_serversiderendering.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Server Side Rendering
22

3-
Some projects requires you to render your application on the server. There are different reason to do this, like search engine optimizations, general optimizations and even browser support. What this means for state management is that you want to expose a version of your state on the server and render the components with that state. But that is not all, you also want to **hydrate** the changed state and pass it to the client with the HTML so that it can **rehydrate** and make sure that when the client renders initially, it renders the same UI.
3+
Some projects require you to render your application on the server. There are different reasons to do this, like search engine optimizations, general optimizations and even browser support. What this means for state management is that you want to expose a version of your state on the server and render the components with that state. But that is not all, you also want to **hydrate** the changed state and pass it to the client with the HTML so that it can **rehydrate** and make sure that when the client renders initially, it renders the same UI.
44

55
## Preparing the project
66

7-
When doing server side rendering the configuration of your application will be shared by the client and the server. That means you need to structure your app to make that possible. There is really not much you need to do.
7+
When doing server-side rendering the configuration of your application will be shared by the client and the server. That means you need to structure your app to make that possible. There is really not much you need to do.
88

99
```marksy
1010
h(Example, { name: "guide/writingtests/structuringtheapp.ts" })
@@ -14,11 +14,11 @@ Here we only export the configuration from the main Overmind file. The instantia
1414

1515
## Preparing effects
1616

17-
The effects will also be shared with the server. Typically this is not an issue, but you should be careful about creating effects that runs logic when they are defined. You might also consider lazy loading effects so that you avoid loading them on the server at all. You can read more about in the [running side effects guide](/http://localhost:4000/guides/beginner/04_runningsideeffects).
17+
The effects will also be shared with the server. Typically this is not an issue, but you should be careful about creating effects that run logic when they are defined. You might also consider lazy-loading effects so that you avoid loading them on the server at all. You can read more about them in the [running side effects guide](/http://localhost:4000/guides/beginner/04_runningsideeffects).
1818

1919
## Rendering on the server
2020

21-
When you render your application on the server you will have to create an instance of Overmind designed for running on the server. On this instance you can change the state and provide it to your components for rendering. When the components have rendered you can **hydrate** the changes and pass them a long to the client so that you can **rehydrate**.
21+
When you render your application on the server you will have to create an instance of Overmind designed for running on the server. On this instance you can change the state and provide it to your components for rendering. When the components have rendered you can **hydrate** the changes and pass them along to the client so that you can **rehydrate**.
2222

2323
```marksy
2424
h(Notice, null, "Overmind does not hydrate the state, but the mutations you performed. That means it minimizes the payload passed over the wire.")
@@ -39,5 +39,5 @@ h(Example, { name: "guide/serversiderendering/renderonclient.ts" })
3939
```
4040

4141
```marksy
42-
h(Notice, null, "If you are using state first routing, make sure you prevent the router from firing off the initial route, as this is not needed")
42+
h(Notice, null, "If you are using state first routing, make sure you prevent the router from firing off the initial route, as this is not needed.")
4343
```

0 commit comments

Comments
 (0)