elegantthemes / Divi-Beta

8 stars 0 forks source link

The useDynamicData() properties don’t make sense (to me) #44

Open dtcblyth opened 10 months ago

dtcblyth commented 10 months ago

Related thread: https://discord.com/channels/1041765492907589683/1085580473243279461

Problem:

I’m looking for a way to check whether dynamic data is being used and, if so, whether the data is currently loading. Currently, the properties returned by useDynamicData() don’t tell me what I need to know... in fact, they don’t really make sense to me.

In the screen shot below you can see the following:

1) While the dynamic data is resolving the isDynamic value is false and the isLoading value is also false. 2) After the dynamic data is resolved the isDynamic value is true and the isLoading value is still false.

I would have thought that the isDynamic property should always be true if dynamic data is being used, and the isLoading property should be false while the dynamic value is being resolved and true after it is resolved.

Screenshot_2023-10-04_at_11 46 58_AM