create store in _render, fixes #1107

pull/1116/head
James Birtles 7 years ago
parent 6596913da3
commit b180f8a67b

@ -114,7 +114,6 @@ export default function ssr(
}
var result = { head: '', addComponent };
${templateProperties.store && `options.store = %store();`}
var html = ${name}._render(result, state, options);
var cssCode = Array.from(components).map(c => c.css && c.css.code).filter(Boolean).join('\\n');
@ -130,6 +129,7 @@ export default function ssr(
}
${name}._render = function(__result, state, options) {
${templateProperties.store && `options.store = %store();`}
__result.addComponent(${name});
state = Object.assign(${initialState.join(', ')});

Loading…
Cancel
Save