Web Development, Typescript, Orm, Full Stack.
key={todo.id}>{todo.title} by {todo.owner.name}</li> )) } </ul>); } // create a todo const { mutate: create } = useCreateTodo(); function onCreate() { create({ data: { title: 'Get things done', owner: { connect: { id: userId } } } }); } As you can see, using the hooks is very similar to using