File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ npm install @cicerchie/svelte-swr
41
41
42
42
``` svelte
43
43
<script>
44
- import { newSWR } from "@cicerchie/svelte-swr";
44
+ import { useSWR } from "@cicerchie/svelte-swr";
45
45
46
- const players = newSWR <PlayerList>();
46
+ const players = useSWR <PlayerList>();
47
47
48
48
$: players.update({
49
49
key: `players?page=${page}&filter=${JSON.stringify(filter)}`,
Original file line number Diff line number Diff line change 1
1
export { getValuesFromCacheByKeysStartingWith } from "./cache" ;
2
2
export { globalIsFetching } from "./indicator" ;
3
- export { newSWR } from "./swr" ;
3
+ export { useSWR } from "./swr" ;
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ const swrMachine: FSMMachineConfig = {
101
101
} ,
102
102
} ;
103
103
104
- export function newSWR < T > ( ) {
104
+ export function useSWR < T > ( ) {
105
105
// const store = writable<SWRStore<T>>({ ...defaultSWRStore }, () => {
106
106
// fsm.setEnabled(true);
107
107
// return () => {
You can’t perform that action at this time.
0 commit comments