@@ -34,7 +34,7 @@ const CardWithHydrationOnDemand = withHydrationOnDemand({ on: ["visible"] })(
3434// Hydrate when the browser's event loop is idle
3535const CardWithHydrationOnDemand = withHydrationOnDemand ({ on: [" idle" ] })(Card);
3636
37- // Hydrate after delay (by default: 2000ms)
37+ // Hydrate after a delay (by default: 2000ms)
3838const CardWithHydrationOnDemand = withHydrationOnDemand ({ on: [" delay" ] })(
3939 Card
4040);
@@ -49,11 +49,14 @@ const CardWithHydrationOnDemand = withHydrationOnDemand({
4949 on: [[" scroll" , document ]]
5050})(Card);
5151
52- // Hydrate when the when the browser's event loop is idle or when the user scroll, withever come first
52+ // Hydrate when the when the browser's event loop is idle or when the user scroll, whichever comes first
5353const CardWithHydrationOnDemand = withHydrationOnDemand ({
5454 on: [" idle" , " visible" ]
5555})(Card);
5656
57+ // Never hydrate unless forceHydrate is set to true in the props
58+ const CardWithHydrationOnDemand = withHydrationOnDemand ()(Card);
59+
5760// ...
5861
5962export default class App extends React .Component {
@@ -72,7 +75,7 @@ If the component isn't rendered server side, it will render directly and behave
7275#### ` on: Array `
7376
7477An array of events who will trigger the hydration.
75- Can contains event names directly or array of 2 elements : ` ['event name', options] ` .
78+ Can contains event names directly or if you want to pass options, as an array : ` ['event name', options] ` .
7679
7780``` js
7881import withHydrationOnDemand from " react-hydration-on-demand" ;
@@ -136,6 +139,6 @@ export default class App extends React.Component {
136139}
137140```
138141
139- #### ` forceHydration: Object ` (optional)
142+ #### ` forceHydration: Boolean ` (optional)
140143
141144Force the hydration of the component.
0 commit comments