Learning Recoil.js

Understanding the basic idea of recoil.js

Now I finally understand Recoil.js, a global state management library for React.js, which helps us create a data-flow graph that flows from atoms through selectors and down into your React components.

But while using react Recoil.js in Next.js, I came across an error which said 'Duplicate atom key "dummy_data_selector." This is a FATAL ERROR in production.' but this happens because of hot module replacement.

A tip for minimizing the occurrence of this error is that you should create your global state in a separate file and whenever you update that file, this error will appear only then. So you can work distraction-free.