You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates documentation "Get Started" page "Next steps" section.
Fixes some code examples in the documentation.
Fixes some styling in the documentation.
Related to #15
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,10 +64,10 @@ export default function App() {
64
64
Similarly how you would run a script with `node`, use `react-server` to start your app. Magic!
65
65
66
66
```sh
67
-
pnpm exec react-server ./App.tsx --open
67
+
pnpm exec react-server ./App.tsx
68
68
```
69
69
70
-
> **Note:** if you don't want to install the `@lazarv/react-server` package and you just want to try out something quickly, you can use `npx` to run the `react-server` CLI. This way, it's not required to install anything else if you use JavaScript. It's enough to have a `.jsx` file with a React Server Component exported as default to run your application. Just run `npx @lazarv/react-server ./App.jsx --open` to start your application in development mode.
70
+
> **Note:** if you don't want to install the `@lazarv/react-server` package and you just want to try out something quickly, you can use `npx` to run the `react-server` CLI. This way, it's not required to install anything else if you use JavaScript. It's enough to have a `.jsx` file with a React Server Component exported as default to run your application. Just run `npx @lazarv/react-server ./App.jsx` to start your application in development mode.
71
71
72
72
#### Build
73
73
@@ -116,7 +116,7 @@ Move your entrypoint component from `./App.tsx` to `./app/layout.tsx` and `./app
116
116
Just start `react-server` without specifying an entrypoint.
117
117
118
118
```sh
119
-
pnpm exec react-server --open
119
+
pnpm exec react-server
120
120
```
121
121
122
122
Read more about file-system based routing at [react-server.dev/router](https://react-server.dev/router).
Copy file name to clipboardExpand all lines: docs/src/pages/en/(pages)/guide/get-started.mdx
+95-3Lines changed: 95 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ order: 0
4
4
---
5
5
6
6
importLinkfrom"../../../../components/Link.jsx";
7
+
importCardfrom"../../../../components/Card.jsx";
8
+
importPillfrom"../../../../components/Pill.jsx";
7
9
8
10
# Get Started
9
11
@@ -49,9 +51,11 @@ export default function App() {
49
51
To start your application in development mode, you can use the `react-server` CLI simply by passing the path to your application entry file. By using the `--open` flag, your application will be opened in your default browser on http://localhost:3000.
50
52
51
53
```sh
52
-
pnpm exec react-server ./App.jsx --open
54
+
pnpm exec react-server ./App.jsx
53
55
```
54
56
57
+
> **Note:** if you want to open the application in your default browser, you can use the `--open` flag.
58
+
55
59
<Linkname="build">
56
60
## Build
57
61
</Link>
@@ -72,10 +76,98 @@ To start your application in production, just use the `start` command. This will
72
76
pnpm exec react-server start
73
77
```
74
78
75
-
> **Note:** if you don't want to install the `@lazarv/react-server` package and you just want to try out something quickly, you can use `npx` to run the `react-server` CLI. This way, it's not required to install anything else if you use JavaScript. It's enough to have a `.jsx` file with a React Server Component exported as default to run your application. Just run `npx @lazarv/react-server ./App.jsx --open` to start your application in development mode.
79
+
> **Note:** if you don't want to install the `@lazarv/react-server` package and you just want to try out something quickly, you can use `npx` to run the `react-server` CLI. This way, it's not required to install anything else if you use JavaScript. It's enough to have a `.jsx` file with a React Server Component exported as default to run your application. Just run `npx @lazarv/react-server ./App.jsx` to start your application in development mode.
76
80
77
81
<Linkname="next-steps">
78
82
## Next steps
79
83
</Link>
80
84
81
-
Now that you have a basic understanding of how to get started with `@lazarv/react-server`, you can learn more about the advanced features in the following sections.
85
+
Success! You have now created your first application using `@lazarv/react-server`.
86
+
87
+
Here are some recommended topics to learn more about. You can read these in any order you would like. You can even leave for now to start building your application and come back when you run into trouble or have a question.
88
+
89
+
> Don't forget that you can join a discussion on [GitHub Discussions](https://github.com/lazarv/react-server/discussions) if you have any questions or need help.
Learn how to integrate with other libraries and how the framework works togetherwith tools like Vite, TypeScript, Tailwind CSS and more.
99
+
100
+
<Pillhref="/integrations">
101
+
Learn more
102
+
</Pill>
103
+
</Card>
104
+
105
+
<Card>
106
+
107
+
#### Framework
108
+
109
+
##### Advanced features
110
+
111
+
Learn about the advanced features of the framework, like how to access the HTTP request and response objects, how to use caching, or how to build a micro-frontend application.
112
+
113
+
<Pillhref="/framework">
114
+
Learn more
115
+
</Pill>
116
+
</Card>
117
+
118
+
<Card>
119
+
120
+
#### Router
121
+
122
+
##### File-system based router
123
+
124
+
Learn how to use the file-system based router to create a full-fledged application with nested routes, dynamic routes, and more.
125
+
126
+
<Pillhref="/router">
127
+
Learn more
128
+
</Pill>
129
+
</Card>
130
+
</div>
131
+
132
+
You can also learn more about the framework by reading the following tutorials. These are not required to get started, but they can be helpful to understand some of the concepts and features.
Create a new React application with server-side rendering in just a few steps. Start building your app with React Server Components and enjoy faster initial page loads.
142
+
143
+
<Pillhref="/tutorials/hello-world">
144
+
Read tutorial
145
+
</Pill>
146
+
</Card>
147
+
148
+
<Card>
149
+
150
+
#### Todo App
151
+
152
+
##### Using server actions
153
+
154
+
Build a simple Todo application with server actions. Learn how to interact with the server from your components and manage server-side operations efficiently.
155
+
156
+
<Pillhref="/tutorials/todo-app">
157
+
Read tutorial
158
+
</Pill>
159
+
</Card>
160
+
161
+
<Card>
162
+
163
+
#### Photos
164
+
165
+
##### Using client components
166
+
167
+
Learn how to use client components to create interactive elements in your application. Enhance your user experience with client-side rendering and dynamic content updates.
To use custom components, you have to create an `mdx-components.jsx` or `mdx-components.tsx` file in your project root. This file should export a `useMDXComponents` function that returns an object with the custom components.
0 commit comments