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
Copy file name to clipboardExpand all lines: README.md
+6-12
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,20 @@
6
6
7
7
This is an `esbuild` plugin for compiling libraries compatible with React 18 server and client component, Nextjs13, Remix, etc.
8
8
9
-
## Why?
9
+
## Why?
10
10
11
11
- Unleash the power of combining react client and server components in your libraries
12
12
- TypeScript out of the box
13
13
- Simple and tiny
14
-
- Easy to use - just add the plugin and you are good to go
14
+
- Easy to use — just add the plugin, and you are good to go
15
15
16
-
Introduction of React server components in React 18 has unlocked immense possibilities. However, library authors are not yet able to fully encash upon this potential. Many libraries like `chakra-ui`, simply add "use client" for each component. However, much more can be unlashed when we can use both server and client components to build libraries.
16
+
Introduction of React server components in React 18 has unlocked immense possibilities. However, library authors are not yet able to fully encash upon this potential. Many libraries, like `chakra-ui`, simply add “use client” for each component. However, much more can be unleashed when we can use both server and client components to build libraries. Also check-out this [blog](https://mayank1513.medium.com/unleash-the-power-of-react-server-components-eb3fe7201231).
17
17
18
18
## Compatibility
19
19
20
-
- JavaScript/TypeScript React libraries using `tsup` or other builders based on `esbuild`
20
+
- JavaScript/TypeScript React libraries using `tsup` or other builders based on `esbuild`
21
21
22
-
This plugin seamlessly integrates with `tsup` and other builders based on `esbuild`. With this you can have both server and client components in your library and the plugin will take care of the rest. All you need to do is add this plugin and add `"use client";` on top of client components (in your source code).
22
+
This plugin seamlessly integrates with `tsup` and any other builders based on `esbuild`. With this you can have both server and client components in your library and the plugin will take care of the rest. All you need to do is add this plugin and add `"use client";` on top of client components (in your source code).
23
23
24
24
## Add dependencies:
25
25
@@ -39,12 +39,8 @@ or
39
39
npm install -D esbuild-react18-useclient
40
40
```
41
41
42
-
43
-
44
42
> If you are using `monorepo` or `workspaces` you can install this plugin to root using `-w` or to specific workspace using `--filter your-package` or `--scope your-package` for `pnpm` and `yarn` workspaces respectively.
0 commit comments