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
4141
4242``` svelte
4343<script>
44- import { newSWR } from "@cicerchie/svelte-swr";
44+ import { useSWR } from "@cicerchie/svelte-swr";
4545
46- const players = newSWR <PlayerList>();
46+ const players = useSWR <PlayerList>();
4747
4848 $: players.update({
4949 key: `players?page=${page}&filter=${JSON.stringify(filter)}`,
Original file line number Diff line number Diff line change 11export { getValuesFromCacheByKeysStartingWith } from "./cache" ;
22export { 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 = {
101101 } ,
102102} ;
103103
104- export function newSWR < T > ( ) {
104+ export function useSWR < T > ( ) {
105105 // const store = writable<SWRStore<T>>({ ...defaultSWRStore }, () => {
106106 // fsm.setEnabled(true);
107107 // return () => {
You can’t perform that action at this time.
0 commit comments