mirror of https://github.com/sveltejs/svelte
Merge pull request #1116 from UnwrittenFun/fix/ssr-nested-store
Fix passing a store to nested components on server sidepull/1105/merge
commit
7bf743ca96
@ -0,0 +1,13 @@
|
||||
<h1>Hello, {{$name}}!</h1>
|
||||
|
||||
<script>
|
||||
import { Store } from '../../../../store.js';
|
||||
|
||||
export default {
|
||||
store () {
|
||||
return new Store({
|
||||
name: 'world'
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
store: true, // TODO remove this in v2
|
||||
|
||||
html: `
|
||||
<h1>Hello, world!</h1>
|
||||
`,
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
<Nested/>
|
||||
|
||||
<script>
|
||||
import Nested from './Nested.html';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Nested
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue