first time with recoil any tip for access params
See original GitHub issueTypeError: Object(…) is not a function
i get this error when am trying send params down
export const fetchjobs = selector({
key: “fetchjobs”,
get: (counter) => async ({ get }) => {
try {
const response = axios(
"/jobs? _start=
+ counter + “&_limit=10”
);
const data = response.data;
return data;
} catch (error) {
console.log(error);
throw error;
}
},
});
i call it
const jobsDataFetched = useRecoilValueLoadable(waitForAll(fetchjobs(20)));
if (state === “hasValue”) { const { contents } = jobsDataFetched; // console.log(contents); return <JobsLayout postlist={contents} />; }
what ever every thing works just fine if i called it with out any parameters
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Exploring Asynchronous Requests in Recoil - AppSignal Blog
Recoil makes it possible to fire requests as soon as an event like a click occurs. The query does not execute in the...
Read more >reactjs - Recoil Atom and Typescript, define type and pass ...
At this time, I use the default property to define each ... I want to pass an atom in a function but I...
Read more >Recoil - Counter-Strike Wiki - Fandom
Due to how the recoil application stays constant, spray patterns, the pattern that bullets make while spraying due to recoil but without any...
Read more >NGSW: Pros and cons of the Next Generation Squad Weapon ...
Both weapons utilize a gas and recoil system, but General Dynamics has not elaborated any further. A short recoil, impulse averaging ...
Read more >External ballistics (from gun to target) - FIREARMS TUTORIAL
Higher pressures require a bigger gun with more recoil that is slower to load and ... As the bullet traverses the barrel of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @hazem-a1
If you want to pass a parameter to a selector then you might be looking for selectorFamily.
ok after changed the mock data api it works fine i can access the data from my component
i must done some thing wrong in my app i just will refactor it
thanks for help @acutmore