@@ -140,7 +140,7 @@ export const getNotes = () =>
140140Komponentti <i >App</i > yksinkertaistuu nyt hiukan
141141
142142``` js
143- import { useQuery } from ' react-query'
143+ import { useQuery } from ' @tanstack/ react-query'
144144import { getNotes } from ' ./requests' // highlight-line
145145
146146const App = () => {
@@ -178,7 +178,7 @@ export const createNote = newNote => // highlight-line
178178Komponentti <i >App</i > muuttuu seuraavasti
179179
180180``` js
181- import { useQuery , useMutation } from ' react-query' // highlight-line
181+ import { useQuery , useMutation } from ' @tanstack/ react-query' // highlight-line
182182import { getNotes , createNote } from ' ./requests' // highlight-line
183183
184184const App = () => {
@@ -218,7 +218,7 @@ Jotta saamme renderöityä myös uuden muistiinpanon, meidän on kerrottava Reac
218218Invalidointi on onneksi helppoa, se voidaan tehdä kytkemällä mutaatioon sopiva <i >onSuccess</i >-takaisinkutsufunktio:
219219
220220``` js
221- import { useQuery , useMutation , useQueryClient } from ' react-query' // highlight-line
221+ import { useQuery , useMutation , useQueryClient } from ' @tanstack/ react-query' // highlight-line
222222import { getNotes , createNote } from ' ./requests'
223223
224224const App = () => {
@@ -253,7 +253,7 @@ export const updateNote = updatedNote =>
253253Myös muistiinpanon päivittäminen tapahtuu mutaation avulla. Komponentti <i >App</i > laajenee seuraavasti:
254254
255255``` js
256- import { useQuery , useMutation , useQueryClient } from ' react-query'
256+ import { useQuery , useMutation , useQueryClient } from ' @tanstack/ react-query'
257257import { getNotes , createNote , updateNote } from ' ./requests' // highlight-line
258258
259259const App = () => {
0 commit comments