-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete
refetch
from createQueryResource
- Loading branch information
1 parent
c395f27
commit 065cede
Showing
3 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@farfetched/solid': minor | ||
--- | ||
|
||
Delete `refetch` from `createQueryResource` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# v0.7 | ||
|
||
## Migration guide | ||
|
||
### Do not use `refetch` in `@farfetched/solid` | ||
|
||
`refetch` was deprecated in [v0.7](/releases/0-7), use `start` instead. | ||
|
||
::: code-group | ||
|
||
```tsx [before] | ||
import { createQueryResource } from '@farfetched/solid'; | ||
|
||
function User() { | ||
const [user, { refetch }] = createQueryResource(userQuery); | ||
|
||
return ( | ||
<div> | ||
<button onClick={refetch}>Start query</button> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
```tsx [after] | ||
import { createQueryResource } from '@farfetched/solid'; | ||
|
||
function User() { | ||
const [user, { start }] = createQueryResource(userQuery); | ||
|
||
return ( | ||
<div> | ||
<button onClick={start}>Start query</button> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
::: | ||
|
||
<!--@include: ./0-8.changelog.md--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters