repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

commit
8b8db0c
parent
81dea06
author
Eric Bower
date
2023-11-23 02:44:49 +0000 UTC
docs: readme
1 files changed,  +3, -3
M README.md
+3, -3
 1@@ -131,14 +131,14 @@ import { fetchUsers } from "./api.ts";
 2 
 3 function App() {
 4   const users = useSelector(db.users.selectTableAsList);
 5-  const loader = useApi(fetchUsers());
 6+  const api = useApi(fetchUsers());
 7 
 8   return (
 9     <div>
10       {users.map((u) => <div>{u.name}</div>)}
11       <div>
12-        <button onClick={loader.trigger()}>fetch users</button>
13-        {loader.isLoading ? <div>Loading ...</div> : null}
14+        <button onClick={api.trigger()}>fetch users</button>
15+        {api.isLoading ? <div>Loading ...</div> : null}
16       </div>
17     </div>
18   );