Skip to content

Commit d2b1aff

Browse files
committed
update readme
1 parent e76b981 commit d2b1aff

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@
66
77
This is an `esbuild` plugin for compiling libraries compatible with React 18 server and client component, Nextjs13, Remix, etc.
88

9+
## Why?
10+
11+
- Unleash the power of combining react client and server components in your libraries
12+
- TypeScript out of the box
13+
- Simple and tiny
14+
- Easy to use - just add the plugin and you are good to go
15+
916
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.
1017

11-
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.
18+
## Compatibility
19+
20+
- JavaScript/TypeScript React libraries using `tsup` or other builders based on `esbuild`
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).
1223

1324
## Add dependencies:
1425

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"esbuild-plugin",
2121
"useclient",
2222
"tsup",
23+
"typescript",
2324
"react18",
2425
"react-server-components",
2526
"react-client-components",

0 commit comments

Comments
 (0)