DEV Community

Discussion on: State Management: How to tell a bad boolean from a good boolean

ultrox profile image
Marko Vujanic • Edited on

You are missing, idle or 'not-asked' state here.

Recently I got interested into Elm and what I really like about that community is that they promote data structure first approach for building apps.

For curious, have a look more in depth about ideas borrowed from Elm here

mattpocockuk profile image
Matt Pocock Author

I'm assuming the data fetch is made when you first enter the page, meaning that the 'idle' state will likely only show for one render - so is not worth handling.

Love the look of elm but never tried it!

lucas_castro profile image
Lucas Castro

Also, a common pattern that makes "idle" unnecessary on auto-loading states, is to start with the status as "loading" by default/definition.