@sequencemedia/react-redux-render 2.2.0 → 2.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencemedia/react-redux-render",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "React Render",
5
5
  "keywords": [
6
6
  "React",
package/src/index.mjs CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @typedef {import('redux').Store} Store
3
+ */
4
+
1
5
  import debug from 'debug'
2
6
 
3
7
  import {
@@ -10,7 +14,7 @@ const log = debug('@sequencemedia/react-redux-render')
10
14
  log('`react-redux-render` is awake')
11
15
 
12
16
  /**
13
- * @param {Object.<string, any>} store
17
+ * @param {Store} store
14
18
  * @param {React.ReactElement} Component
15
19
  * @param {Object.<string, any>} props
16
20
  * @returns {string}
@@ -18,7 +22,7 @@ log('`react-redux-render` is awake')
18
22
  export const renderToString = (store, Component, props = {}) => getReactDOMServerRenderToString(store, Component, props)
19
23
 
20
24
  /**
21
- * @param {Object.<string, any>} store
25
+ * @param {Store} store
22
26
  * @param {React.ReactElement} Component
23
27
  * @param {Object.<string, any>} props
24
28
  * @returns {string}
@@ -26,7 +30,7 @@ export const renderToString = (store, Component, props = {}) => getReactDOMServe
26
30
  export const renderToStaticMarkup = (store, Component, props = {}) => getReactDOMServerRenderToStaticMarkup(store, Component, props)
27
31
 
28
32
  /**
29
- * @param {Object.<string, any>} store
33
+ * @param {Store} store
30
34
  * @param {React.ReactElement} Component
31
35
  * @param {Object.<string, any>} props
32
36
  * @returns {Promise<string>}
@@ -1,8 +1,17 @@
1
+ /**
2
+ * @typedef {import('redux').Store} Store
3
+ */
4
+
5
+ import debug from 'debug'
1
6
  import React from 'react'
2
7
  import ReactDOMServer from 'react-dom/server'
3
8
  import Boom from '@hapi/boom'
4
9
  import { Provider } from 'react-redux'
5
10
 
11
+ const log = debug('@sequencemedia/react-redux-render')
12
+
13
+ log('`react-redux-render` is awake')
14
+
6
15
  /**
7
16
  * @param {Error} e
8
17
  * @param {{props: Object.<string, any>}} data
@@ -11,7 +20,7 @@ import { Provider } from 'react-redux'
11
20
  const badImplementation = (e, data) => Boom.boomify(e, { statusCode: 500, message: 'Rendering exception', data })
12
21
 
13
22
  /**
14
- * @param {Object.<string, any>} store
23
+ * @param {Store} store
15
24
  * @param {React.ReactElement} Component
16
25
  * @param {Object.<string, any>} props
17
26
  * @returns {string}
@@ -33,7 +42,7 @@ export function getReactDOMServerRenderToString (store, Component, props) {
33
42
  }
34
43
 
35
44
  /**
36
- * @param {Object.<string, any>} store
45
+ * @param {Store} store
37
46
  * @param {React.ReactElement} Component
38
47
  * @param {Object.<string, any>} props
39
48
  * @returns {string}