question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: uninitialized atom

See original GitHub issue

Can you please explain what does this mean? I get this error in an async action when calling get(derivedAtom).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dusanjovanovcommented, Feb 8, 2021

That actually worked, thanks!

1reaction
dai-shicommented, Feb 8, 2021

Thanks. Yeah, it would be nice to support this use case. The reason we can’t now is selectedViewAtom can be async, and we can’t distinguish whether it’s async.

Meanwhile, what you can do is:

const selectedViewIdAtom = atom(null)
const viewsAtom = atom([])
const getSelectedView = get => {
  return get(viewAtom).find(
    (s) => s.id=== get(selectedViewIdAtom)
  );
} 
const selectedViewAtom = atom(getSelectedView)

const loadViewsAtom = atom(null, async (get, set) => {
  ...
  const selectedView = getSelectedView(get) // this probably works.
  ...
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting a "uninitialized constant Feed::Feedzirra ...
Feedzirra::Parser::Atom) ? atom : nil end. When I load the page I get an "uninitialized constant Feed::Feedzirra" error.
Read more >
Uninitialized Variable - an overview | ScienceDirect Topics
Uninitialized variables, such as f in fib(), are a common source of errors. In terms of dependences, declarations such as int f should...
Read more >
Build fail when building 32 bit electron on Windows 10 with ...
... The build is failing with the following error C:\Users\deni... ... warning C4703: potentially uninitialized local pointer variable ...
Read more >
Attempted to upload uninitialized error - PROS Support - VEX Forum
Hi, I am currently using PROS through the VS Code extension on Mac(M1). I've been having some issues but managed to solve quite...
Read more >
Kokkos error: Constructing View and initializing data with ...
I am trying to use the Kokkos package so as to utilize the GPU in some ReaxFF calculations. When I try to run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found