File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -189,20 +189,20 @@ export const UserResource = resource({
189
189
});
190
190
```
191
191
192
- ``` ts title="resources/Todo" collapsed
192
+ ``` ts title="resources/Todo"
193
193
import { User } from ' ./User' ;
194
194
195
195
export class Todo extends Entity {
196
196
id = 0 ;
197
197
userId = 0 ;
198
- user? = User .fromJS ({} );
198
+ user? = User .fromJS ();
199
199
title = ' ' ;
200
200
completed = false ;
201
201
static schema = {
202
202
user: User ,
203
203
};
204
- static process(value ) {
205
- return { ... value , user: value .userId };
204
+ static process(todo ) {
205
+ return { ... todo , user: todo .userId };
206
206
}
207
207
}
208
208
export const TodoResource = resource ({
@@ -212,7 +212,7 @@ export const TodoResource = resource({
212
212
});
213
213
```
214
214
215
- ``` tsx title="TodoJoined"
215
+ ``` tsx title="TodoJoined" collapsed
216
216
import { TodoResource } from ' ./resources/Todo' ;
217
217
import { UserResource } from ' ./resources/User' ;
218
218
You can’t perform that action at this time.
0 commit comments