Submit boundary
const draft = useAppSelector((s) => s.notesDraft);
const mutation = useMutation({
mutationFn: () => notesApi.create({
title: draft.title,
body: draft.body,
}),
onSuccess: async () => {
dispatch(notesDraftActions.reset());
await queryClient.invalidateQueries({ queryKey: noteKeys.lists() });
},
});Same pattern you will implement in Week 4 Notes UI projects.