@sequencemedia/react-redux-render
TypeScript icon, indicating that this package has built-in type declarations

2.4.78 • Public • Published

react-redux-render

Render isomorphic React apps and components in Node.

  • With Redux

An example implementation of the companion package @sequencemedia/react-router-redux-render can be found in react-router-pagination-io.

Example

In Express:

const express = require('express')

const app = express()
const port = 3000

const {
  configureStore
} = require('./path/to/store')

const store = configureStore()

const {
  renderToString
} = require('react-redux-render')

const App = require('./path/to/react/app')

app.get('/', (req, res) => res.send(renderToString(store, App)))

app.listen(port, () => console.log(`Express ${port}`))

If renderToString encounters an error then it throws a 500 Internal Server Error. Otherwise, it returns a string.

You can supply App with props using the third argument:

renderToString(store, App, {})

(Since this is a Redux app you are unlikely to use props.)

In this package

react-redux-render exports three functions:

  1. renderToString
  2. renderToStaticMarkup
  3. render

renderToString generates <html /> including the attributes that React uses in ReactDOM.hydrate(). It implements ReactDOMServer.renderToString().

renderToStaticMarkup doesn't include those attributes. It's useful for using React as a rendering engine for static pages. It implements ReactDOMServer.renderToStaticMarkup().

render executes renderToString but returns a Promise which resolves to a string.

Companion packages

  1. @sequencemedia/react-router-redux-render for React Router apps (with Redux)
  2. @sequencemedia/react-router-render for React Router apps (without Redux)
  3. @sequencemedia/react-render for React Redux apps (without React Router or Redux)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.4.780latest

Version History

VersionDownloads (Last 7 Days)Published
2.4.780
2.4.7776
2.4.7686
2.4.7570
2.4.7466
2.4.7324
2.4.7217
2.4.7113
2.4.7012
2.4.6912
2.4.689
2.4.6710
2.4.6610
2.4.659
2.4.6411
2.4.639
2.4.6210
2.4.619
2.4.609
2.4.5910
2.4.589
2.4.5711
2.4.5611
2.4.5510
2.4.5411
2.4.539
2.4.525
2.4.516
2.4.503
2.4.493
2.4.481
2.4.471
2.4.461
2.4.454
2.4.442
2.4.430
2.4.420
2.4.411
2.4.401
2.4.391
2.4.380
2.4.370
2.4.361
2.4.350
2.4.340
2.4.330
2.4.320
2.4.311
2.4.300
2.4.290
2.4.280
2.4.270
2.4.260
2.4.251
2.4.240
2.4.230
2.4.220
2.4.210
2.4.200
2.4.191
2.4.180
2.4.171
2.4.160
2.4.150
2.4.140
2.4.130
2.4.120
2.4.111
2.4.101
2.4.90
2.4.80
2.4.70
2.4.61
2.4.50
2.4.40
2.4.30
2.4.21
2.4.11
2.4.00
2.3.530
2.3.520
2.3.510
2.3.501
2.3.490
2.3.481
2.3.471
2.3.461
2.3.452
2.3.440
2.3.430
2.3.421
2.3.411
2.3.400
2.3.390
2.3.381
2.3.370
2.3.360
2.3.350
2.3.340
2.3.330
2.3.320
2.3.310
2.3.300
2.3.290
2.3.280
2.3.271
2.3.260
2.3.251
2.3.241
2.3.230
2.3.221
2.3.210
2.3.201
2.3.190
2.3.180
2.3.170
2.3.161
2.3.150
2.3.140
2.3.130
2.3.121
2.3.110
2.3.30
2.3.20
2.3.10
2.3.00
2.2.2050
2.2.2040
2.2.2030
2.2.2020
2.2.2010
2.2.2000
2.2.1990
2.2.1980
2.2.1970
2.2.1960
2.2.1950
2.2.1940
2.2.1930
2.2.1920
2.2.1910
2.2.1901
2.2.1890
2.2.1881
2.2.1870
2.2.1860
2.2.1850
2.2.1840
2.2.1830
2.2.1820
2.2.1810
2.2.1800
2.2.1790
2.2.1780
2.2.1771
2.2.1761
2.2.1750
2.2.1740
2.2.1731
2.2.1720
2.2.1711
2.2.1700
2.2.1690
2.2.1680
2.2.1670
2.2.1660
2.2.1650
2.2.1640
2.2.1630
2.2.1620
2.2.1610
2.2.1601
2.2.1591
2.2.1581
2.2.1570
2.2.1560
2.2.1551
2.2.1540
2.2.1530
2.2.1520
2.2.1511
2.2.1500
2.2.1490
2.2.1480
2.2.1470
2.2.1461
2.2.1450
2.2.1440
2.2.1430
2.2.1420
2.2.1410
2.2.1400
2.2.1390
2.2.1380
2.2.1370
2.2.1360
2.2.1350
2.2.1340
2.2.1330
2.2.1320
2.2.1311
2.2.1300
2.2.1290
2.2.1280
2.2.1270
2.2.1260
2.2.1250
2.2.1230
2.2.1220
2.2.1211
2.2.1200
2.2.1190
2.2.1180
2.2.1171
2.2.1161
2.2.1151
2.2.1140
2.2.1130
2.2.1120
2.2.1111
2.2.1100
2.2.1090
2.2.1080
2.2.1070
2.2.1060
2.2.1051
2.2.1040
2.2.1030
2.2.1020
2.2.1011
2.2.1000
2.2.990
2.2.980
2.2.971
2.2.960
2.2.950
2.2.940
2.2.930
2.2.921
2.2.911
2.2.900
2.2.890
2.2.881
2.2.870
2.2.860
2.2.850
2.2.840
2.2.831
2.2.820
2.2.810
2.2.801
2.2.790
2.2.780
2.2.770
2.2.760
2.2.750
2.2.740
2.2.731
2.2.720
2.2.710
2.2.700
2.2.690
2.2.680
2.2.670
2.2.660
2.2.650
2.2.640
2.2.630
2.2.621
2.2.610
2.2.600
2.2.590
2.2.580
2.2.570
2.2.561
2.2.551
2.2.540
2.2.530
2.2.520
2.2.510
2.2.500
2.2.490
2.2.480
2.2.470
2.2.460
2.2.450
2.2.440
2.2.430
2.2.420
2.2.410
2.2.400
2.2.390
2.2.380
2.2.370
2.2.361
2.2.350
2.2.340
2.2.332
2.2.320
2.2.310
2.2.301
2.2.290
2.2.280
2.2.270
2.2.260
2.2.250
2.2.240
2.2.231
2.2.220
2.2.210
2.2.200
2.2.190
2.2.180
2.2.171
2.2.160
2.2.150
2.2.140
2.2.130
2.2.120
2.2.110
2.2.100
2.2.90
2.2.80
2.2.70
2.2.61
2.2.51
2.2.40
2.2.31
2.2.20
2.2.00
2.2.11
2.1.00
2.0.4311
2.0.4300
2.0.4291
2.0.4280
2.0.4270
2.0.4260
2.0.4251
2.0.4240
2.0.4231
2.0.4221
2.0.4210
2.0.4200
2.0.4190
2.0.4181
2.0.4160
2.0.4170
2.0.4150
2.0.4140
2.0.4130
2.0.4120
2.0.4110
2.0.4100
2.0.4081
2.0.4090
2.0.4071
2.0.4060
2.0.4051
2.0.4040
2.0.4031
2.0.4011
2.0.4020
2.0.3990
2.0.3980
2.0.3960
2.0.3970
2.0.3951
2.0.3940
2.0.3930
2.0.3920
2.0.3910
2.0.3900
2.0.3890
2.0.3881
2.0.3870
2.0.3860
2.0.3850
2.0.3840
2.0.3830
2.0.3821
2.0.3810
2.0.3800
2.0.3790
2.0.3780
2.0.3770
2.0.3740
2.0.3730
2.0.3720
2.0.3710
2.0.3700
2.0.3690
2.0.3680
2.0.3670
2.0.3661
2.0.3650
2.0.3641
2.0.3630
2.0.3621
2.0.3611
2.0.3600
2.0.3590
2.0.3580
2.0.3570
2.0.3560
2.0.3551
2.0.3541
2.0.3530
2.0.3520
2.0.3510
2.0.3500
2.0.3490
2.0.3480
2.0.3470
2.0.3460
2.0.3451
2.0.3440
2.0.3431
2.0.3420
2.0.3410
2.0.3400
2.0.3390
2.0.3380
2.0.3371
2.0.3360
2.0.3350
2.0.3340
2.0.3330
2.0.3320
2.0.3310
2.0.3300
2.0.3291
2.0.3280
2.0.3270
2.0.3260
2.0.3251
2.0.3240
2.0.3231
2.0.3220
2.0.3210
2.0.3201
2.0.3191
2.0.3180
2.0.3171
2.0.3160
2.0.3151
2.0.3141
2.0.3130
2.0.3121
2.0.3111
2.0.3100
2.0.3091
2.0.3080
2.0.3070
2.0.3060
2.0.3050
2.0.3040
2.0.3030
2.0.3020
2.0.3010
2.0.3000
2.0.2991
2.0.2980
2.0.2970
2.0.2960
2.0.2950
2.0.2940
2.0.2930
2.0.2920
2.0.2911
2.0.2900
2.0.2890
2.0.2881
2.0.2870
2.0.2861
2.0.2850
2.0.2841
2.0.2830
2.0.2821
2.0.2810
2.0.2801
2.0.2790
2.0.2780
2.0.2770
2.0.2761
2.0.2751
2.0.2740
2.0.2730
2.0.2720
2.0.2710
2.0.2701
2.0.2690
2.0.2680
2.0.2670
2.0.2660
2.0.2650
2.0.2640
2.0.2630
2.0.2620
2.0.2610
2.0.2600
2.0.2590
2.0.2581
2.0.2571
2.0.2560
2.0.2550
2.0.2540
2.0.2530
2.0.2520
2.0.2510
2.0.2501
2.0.2490
2.0.2480
2.0.2471
2.0.2460
2.0.2450
2.0.2440
2.0.2430
2.0.2420
2.0.2410
2.0.2400
2.0.2390
2.0.2380
2.0.2370
2.0.2360
2.0.2350
2.0.2340
2.0.2330
2.0.2320
2.0.2310
2.0.2300
2.0.2290
2.0.2280
2.0.2271
2.0.2260
2.0.2251
2.0.2240
2.0.2230
2.0.2220
2.0.2210
2.0.2201
2.0.2190
2.0.2180
2.0.2170
2.0.2160
2.0.2150
2.0.2140
2.0.2130
2.0.2120
2.0.2110
2.0.2100
2.0.2091
2.0.2080
2.0.2071
2.0.2060
2.0.2050
2.0.2040
2.0.2030
2.0.2020
2.0.2010
2.0.2000
2.0.1990
2.0.1980
2.0.1970
2.0.1960
2.0.1950
2.0.1940
2.0.1931
2.0.1921
2.0.1910
2.0.1900
2.0.1890
2.0.1880
2.0.1870
2.0.1860
2.0.1850
2.0.1840
2.0.1830
2.0.1820
2.0.1810
2.0.1800
2.0.1790
2.0.1780
2.0.1770
2.0.1760
2.0.1750
2.0.1740
2.0.1730
2.0.1720
2.0.1711
2.0.1700
2.0.1690
2.0.1681
2.0.1670
2.0.1660
2.0.1650
2.0.1640
2.0.1630
2.0.1621
2.0.1611
2.0.1601
2.0.1590
2.0.1581
2.0.1570
2.0.1561
2.0.1550
2.0.1541
2.0.1531
2.0.1520
2.0.1510
2.0.1500
2.0.1490
2.0.1480
2.0.1471
2.0.1460
2.0.1450
2.0.1440
2.0.1430
2.0.1420
2.0.1410
2.0.1400
2.0.1390
2.0.1380
2.0.1370
2.0.1360
2.0.1350
2.0.1340
2.0.1330
2.0.1320
2.0.1310
2.0.1300
2.0.1290
2.0.1280
2.0.1270
2.0.1260
2.0.1250
2.0.1240
2.0.1230
2.0.1220
2.0.1210
2.0.1200
2.0.1190
2.0.1181
2.0.1170
2.0.1160
2.0.1150
2.0.1140
2.0.1130
2.0.1120
2.0.1110
2.0.1101
2.0.1091
2.0.1080
2.0.1070
2.0.1060
2.0.1050
2.0.1040
2.0.1030
2.0.1021
2.0.1010
2.0.1000
2.0.990
2.0.980
2.0.971
2.0.960
2.0.950
2.0.940
2.0.932
2.0.921
2.0.910
2.0.900
2.0.890
2.0.880
2.0.871
2.0.860
2.0.850
2.0.841
2.0.830
2.0.820
2.0.810
2.0.801
2.0.790
2.0.770
2.0.760
2.0.750
2.0.740
2.0.731
2.0.720
2.0.711
2.0.700
2.0.690
2.0.680
2.0.671
2.0.660
2.0.650
2.0.641
2.0.630
2.0.620
2.0.610
2.0.600
2.0.590
2.0.580
2.0.570
2.0.561
2.0.550
2.0.541
2.0.530
2.0.520
2.0.510
2.0.500
2.0.490
2.0.480
2.0.471
2.0.460
2.0.451
2.0.440
2.0.431
2.0.421
2.0.410
2.0.401
2.0.390
2.0.380
2.0.370
2.0.360
2.0.351
2.0.340
2.0.330
2.0.320
2.0.310
2.0.300
2.0.290
2.0.280
2.0.270
2.0.260
2.0.250
2.0.240
2.0.231
2.0.221
2.0.210
2.0.200
2.0.190
2.0.181
2.0.170
2.0.161
2.0.151
2.0.140
2.0.130
2.0.120
2.0.111
2.0.100
2.0.90
2.0.80
2.0.70
2.0.60
2.0.50
2.0.41
2.0.31
2.0.20
2.0.11
2.0.00
1.0.141
1.0.130
1.0.121
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.61
1.0.51
1.0.40
1.0.30
1.0.21
1.0.11
1.0.00

Package Sidebar

Install

npm i @sequencemedia/react-redux-render

Weekly Downloads

731

Version

2.4.78

License

ISC

Unpacked Size

11.7 kB

Total Files

13

Last publish

Collaborators

  • sequencemedialimited
  • jonathanperry