Skip to content

Commit 1928deb

Browse files
committed
Mute WIP api examples
1 parent cd2a0de commit 1928deb

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

packages/core/src/example.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ const $email = createStore('');
1111
const triggerValidation = createEvent<number>();
1212
const validateDefaultFx = createEffect((age: number): boolean => true);
1313

14-
const profile = model({
15-
props: {
16-
age: 0,
17-
email: $email,
18-
triggerValidation,
19-
validateDefaultFx,
20-
validateFx: (email: string): boolean => true,
21-
click: define.event<void>(),
22-
},
23-
create({ age, email, triggerValidation, validateDefaultFx, validateFx }) {
24-
return {
25-
foo: createStore(0),
26-
};
27-
},
28-
});
14+
// const profile = model({
15+
// props: {
16+
// age: 0,
17+
// email: $email,
18+
// triggerValidation,
19+
// validateDefaultFx,
20+
// validateFx: (email: string): boolean => true,
21+
// click: define.event<void>(),
22+
// },
23+
// create({ age, email, triggerValidation, validateDefaultFx, validateFx }) {
24+
// return {
25+
// foo: createStore(0),
26+
// };
27+
// },
28+
// });
2929

30-
const aliceProfile = spawn(profile, {
31-
age: createStore(18),
32-
email: '',
33-
validateDefaultFx: (age) => age > 18,
34-
validateFx: createEffect((email: string) => email.length > 0),
35-
// triggerValidation: createEvent(),
36-
click: createEvent(),
37-
});
30+
// const aliceProfile = spawn(profile, {
31+
// age: createStore(18),
32+
// email: '',
33+
// validateDefaultFx: (age) => age > 18,
34+
// validateFx: createEffect((email: string) => email.length > 0),
35+
// // triggerValidation: createEvent(),
36+
// click: createEvent(),
37+
// });
3838

39-
const bobProfile = spawn(profile, {
40-
age: 20,
41-
email: createStore(''),
42-
validateDefaultFx: createEffect((age: number) => age > 18),
43-
validateFx: async (email) => email.length > 0,
44-
click: createEvent(),
45-
});
39+
// const bobProfile = spawn(profile, {
40+
// age: 20,
41+
// email: createStore(''),
42+
// validateDefaultFx: createEffect((age: number) => age > 18),
43+
// validateFx: async (email) => email.length > 0,
44+
// click: createEvent(),
45+
// });
4646

4747
type Field = {
4848
name: string;

0 commit comments

Comments
 (0)