@nestjs-ssr/react 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +35 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,33 +1,16 @@
1
- # NestJS SSR
1
+ # @nestjs-ssr/react
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/%40nestjs-ssr%2Freact.svg)](https://www.npmjs.com/package/@nestjs-ssr/react)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- > **⚠️ Preview Release**
7
- > This package is currently in active development. The API may change between minor versions. Production use is not recommended yet.
6
+ React as a view layer for NestJS. Controllers return data. Components render it. One app.
8
7
 
9
- Server-rendered React for NestJS. Controllers return data, components render it.
10
-
11
- Clean Architecture: layers separated, dependencies inward, business logic framework-agnostic.
12
-
13
- ## When To Use
14
-
15
- **Use this when:**
16
-
17
- - You have NestJS and want React instead of Handlebars/EJS
18
- - Testable layers matter more than file-based routing
19
- - You want feature modules (controller + service + view together)
20
-
21
- **Use Next.js when:**
22
-
23
- - You're starting fresh without NestJS
24
- - You want the React ecosystem's defaults
25
- - File-based routing fits your mental model
8
+ **[Documentation](https://georgialexandrov.github.io/nest-ssr/)** | **[Getting Started](https://georgialexandrov.github.io/nest-ssr/guide/installation)**
26
9
 
27
10
  ## Quick Start
28
11
 
29
12
  ```bash
30
- npx @nestjs-ssr/react init
13
+ npx @nestjs-ssr/react init
31
14
  ```
32
15
 
33
16
  ```typescript
@@ -58,32 +41,52 @@ expect(await controller.getProduct('123')).toEqual({ product: { id: '123' } });
58
41
  render(<ProductDetail data={{ product: mockProduct }} />);
59
42
  ```
60
43
 
61
- ## Features
44
+ ## What You Get
62
45
 
63
46
  **Rendering:**
64
47
 
65
48
  - Type-safe data flow from controller to component
66
- - Hierarchical layouts (module → controller → method)
67
- - Head tags via decorators (title, meta, OG, JSON-LD)
49
+ - Hierarchical layouts (root → controller → method)
50
+ - Head tags (title, meta, OG, JSON-LD)
51
+ - Stream or string mode
68
52
 
69
53
  **Request Context:**
70
54
 
71
- - Hooks: params, query, headers, session, user agent
55
+ - Hooks: `useParams()`, `useQuery()`, `useHeader()`, `useCookie()`
72
56
  - Whitelist what reaches the client
73
57
 
74
58
  **Development:**
75
59
 
76
- - Integrated mode: one process, full refresh
77
- - Proxy mode: separate Vite, true HMR
60
+ - Integrated mode: Vite inside NestJS, one process
61
+ - Separate mode: standalone Vite server, true HMR
78
62
 
79
- ## Docs
63
+ ## Requirements
80
64
 
81
- [Full documentation →](https://georgialexandrov.github.io/nest-ssr/)
65
+ - Node.js 20+
66
+ - NestJS 11+
67
+ - React 19+
68
+ - Vite 6+
69
+ - TypeScript 5+
82
70
 
83
- ## Examples
71
+ ## Documentation
84
72
 
85
- **[Minimal](./examples/minimal/)** - Simplest setup with integrated Vite mode
86
- **[Minimal HMR](./examples/minimal-hmr/)** - Dual-server architecture for full HMR
73
+ **[georgialexandrov.github.io/nest-ssr](https://georgialexandrov.github.io/nest-ssr/)**
74
+
75
+ - [Installation](https://georgialexandrov.github.io/nest-ssr/guide/installation)
76
+ - [Rendering](https://georgialexandrov.github.io/nest-ssr/guide/rendering)
77
+ - [Request Context](https://georgialexandrov.github.io/nest-ssr/guide/request-context)
78
+ - [Configuration](https://georgialexandrov.github.io/nest-ssr/guide/configuration)
79
+ - [API Reference](https://georgialexandrov.github.io/nest-ssr/guide/api)
80
+
81
+ ## Contributing
82
+
83
+ ```bash
84
+ git clone https://github.com/georgialexandrov/nestjs-ssr.git
85
+ cd nestjs-ssr
86
+ pnpm install
87
+ pnpm build:package
88
+ pnpm test
89
+ ```
87
90
 
88
91
  ## License
89
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs-ssr/react",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "React SSR for NestJS that respects Clean Architecture. Proper DI, SOLID principles, clear separation of concerns.",
5
5
  "keywords": [
6
6
  "nestjs",