recoiljs Questions
1
I've been looking into Zustand and Recoil -- two state management libraries that are relatively new.
Recoil is heavily advertised as being "very performant" for React apps with deeply-nes...
Burck asked 13/7, 2021 at 1:11
3
Solved
I am new to recoil, and I am using all class components.
Here is my recoil state
export const tokenState = atom({
key: "tokenState",
default: "",
});
How to use recoil in cla...
2
Solved
I do use recoil in my nextjs application.
But if I run next (in dev or production make no difference) I got this error-message:
Duplicate atom key "companyData". This is a FATAL ERROR in...
3
I'm trying to set the default value for an atom in RecoilJS as the value of an asynchronous API call. I'm doing this so that when a certain React component renders it will have all of the current s...
Barbershop asked 4/8, 2020 at 22:7
1
Solved
I did my first experiment with recoil, building an editable table. Each cell has an atom which stores its row, column, and text value.
The way I built this was by
initializing each cell's atom int...
Cenac asked 25/5, 2022 at 1:25
3
Solved
I'm new to Recoil.js, I have the following atom and selector for the signed-in user in the app:
const signedInUserAtom = atom<SignedInUser | null>({
key: 'signedInUserAtom',
default: null
}...
Elide asked 26/8, 2021 at 21:35
3
Solved
i used react useRef in functional components to get link on html object and store it in Recoil atom. For example:
const Children = () => {
const [refLink, setSrefLink] = useRecoilState(refLink)...
Stouthearted asked 5/2, 2021 at 17:17
2
Solved
I'm trying to make a dynamic form where the form input fields is rendered from data returned by an API.
Since atom needs to have a unique key, I tried wrapping it inside a function, but every time ...
1
Solved
In RecoilJS, seamless integration with React Suspense for async selectors is a big plus. However, I am running into issues trying to normalize the data cached in Recoil, while still making use of S...
Duroc asked 2/3, 2022 at 2:37
4
Solved
Im playing around with recoil for the first time and cant figure out how I can read all elements from an atomFamily. Let's say I have an app where a user can add meals:
export const meals = atomFam...
2
Can I set the default value of a Recoil atom to be an object?
e.g.:
export const currentUserState = atom({
key: 'currentUserState',
default: { name: '', email: '', userId: null },
});
And then s...
Oberon asked 17/10, 2020 at 19:44
3
Solved
I have some state with React recoil, but whenever the page is manually refreshed, the recoil state is reset.
Is this normal behaviour, because i know other state management libraries like flux and ...
Helmholtz asked 11/8, 2020 at 11:22
1
Solved
I have the following code.
const [verificationValues, setValues] = useRecoilState(verificationFormValues);
setValues({
...verificationValues!,
nidOrPassport,
addressProof,
recentPhoto,
bankAcc...
1
I have to update an atom outside of an React Component (where I can't use hooks). What is the correct way to do this in order to get the updated value in my subscribing React Components with hooks ...
Brachypterous asked 29/9, 2020 at 16:13
1
Solved
How would one structure deep nested state tree with RecoilJS? Should I have every branch as separate atom or something?
1
© 2022 - 2024 — McMap. All rights reserved.