File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed
examples/snippets/chat-room Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,6 @@ const chatRoom = actor({
9
9
messages: [] as Message []
10
10
},
11
11
12
- // Initialize the room
13
- createState : () => ({
14
- messages: []
15
- }),
16
-
17
12
actions: {
18
13
sendMessage : (c , sender : string , text : string ) => {
19
14
const message = { sender , text , timestamp: Date .now () };
Original file line number Diff line number Diff line change @@ -8,11 +8,6 @@ const chatRoom = actor({
8
8
messages : [ ] as Message [ ]
9
9
} ,
10
10
11
- // Initialize the room
12
- createState : ( ) => ( {
13
- messages : [ ]
14
- } ) ,
15
-
16
11
actions : {
17
12
sendMessage : ( c , sender : string , text : string ) => {
18
13
const message = { sender, text, timestamp : Date . now ( ) } ;
@@ -28,4 +23,4 @@ const chatRoom = actor({
28
23
}
29
24
} ) ;
30
25
31
- export default chatRoom ;
26
+ export default chatRoom ;
You can’t perform that action at this time.
0 commit comments