Hoist loading state not working anymore

  1. My goal: Have certain containers which hoist loading

  2. Issue: The global Show loading state now overwrites Hoist loading state globally. Hoist loading state has no impact anymore in our app.

  3. Steps I've taken to troubleshoot:

    Enable Hoist loading state on a container with Show loading state to false: NO loading state

    Disable Hoist loading state on a container with Show loading state to true: Loading state

  4. Additional info: Cloud

I expect to be able to show the loading state for the top level only, showing a single loading state, instead of having every single part of the interface showing a loading state, which looks silly as it is updated every 5 seconds.

Hey @AlexisP,

I had noticed something like this behavior yesterday as well but today I can no longer reproduce the same. Is your issue still present?

Indeed, it is still present (for few months now), on one of our largest project (started long ago, which went through many iterations and Retool upgrades).

Having every single text “loading” and scrolling disabled is a pain for the users. But also, not having any loading could cause issues for certain parts (which have to be updated).

I have a feeling that because it is an older app there is likely some shenaniganary going on around a legacy vs modern app structure. It does seem like the hoist loading state + disable loading states combination is working for me as expected (even through a module).

I can think of a workaround that might serve your needs: a loading modal.

Create a new modal that is only visible when the underlying queries in your app are fetching (isFetching property). Put an indeterminate progress circle on the modal and some default “Your data is loading…” text.

This way, the app won’t show any of the redundant loading spinners but users will still know that they have to wait.

You can also custom craft the loading messages based on which query is currently loading data.

1 Like