mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
failing test for #1327
This commit is contained in:
parent
01cdffa46e
commit
9ac0c40d65
9
test/runtime/samples/store-computed-oncreate/_config.js
Normal file
9
test/runtime/samples/store-computed-oncreate/_config.js
Normal file
@ -0,0 +1,9 @@
|
||||
import { Store } from '../../../../store.js';
|
||||
|
||||
export default {
|
||||
store: new Store(),
|
||||
|
||||
html: `
|
||||
<h1>Hello Brian!</h1>
|
||||
`
|
||||
};
|
10
test/runtime/samples/store-computed-oncreate/main.html
Normal file
10
test/runtime/samples/store-computed-oncreate/main.html
Normal file
@ -0,0 +1,10 @@
|
||||
<h1>Hello {$name}!</h1>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
oncreate() {
|
||||
this.store.set({ user: { name: 'Brian' } });
|
||||
this.store.compute('name', ['user'], user => user && user.name);
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user