diff --git a/src/index.js b/src/index.js index c518fce..51e4c24 100644 --- a/src/index.js +++ b/src/index.js @@ -209,6 +209,9 @@ function resolveNode(node, state, actions) { if (typeof node === 'function') { return resolveNode(node(state, actions), state, actions) } + if (node && node.type === 2) { + return resolveNode(node.lazy.view(node.lazy), state, actions) + } return node } diff --git a/test/index.test.js b/test/index.test.js index e6d858e..b481d81 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -471,6 +471,35 @@ describe('renderToString(view, state, actions)', () => { expect(html).toBe('