You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CreateBase deprecates loading property in favor of authLoading #11243
However, the loading property is more natural because it is used in other objects. authLoading suggests that the loading indicator is only displayed during the authentication phase, while loading is expected to be displayed all the time if authLoading is not set.
From what I understand, the issue is about the inconsistency between CreateBase and EditBase regarding the loading prop.
In CreateBase, loading is already marked as deprecated in favor of authLoading, while in EditBase it is still present and actively used.
This creates an inconsistent API surface across similar controller components (Create vs Edit), even though both are now driven by controller state (useCreateController / useEditController).
It seems the original intention is to discourage external control of loading state in favor of controller-driven flags, except for authLoading which is a special case.
Should the expected direction be:
remove loading entirely from both CreateBase and EditBase, or
keep it for backward compatibility but align behavior/deprecation across both?
I expect to see the loading property next to authLoading or both to be deprecated in favor of a new mechanism.
As a developer using the API, I don't understand why one should be treated differently than the other.
It is confusing to see that authLoading is documented on the <Create> page but no loading property is documented. If none were documented, I would have started looking through the doc for a way of showing the loading indicator. When I saw authLoading in the doc, I dig into the source code and found the comment saying to use authLoading instead of loading. That makes no sense as they should serve different purposes.
I've implemented Option A and updated the deprecation comments to clarify that loading is replaced by the saving state from the controller, as suggested.
PR Details:
chore: deprecate loading prop in EditBase and clarify usage #11249
The idea is that we introduced a loading prop for when the data is loading, and renaned the old loading prop, which was the component displayed while the auth propvider is checked, to authLoading. To make the change backwards compatible, authLoading takes the loading value by default.
But CreateBase is particular: there is no data to load. So it can't really have the same syntax as the other Base components as there is no data loading prop. To be consistent with the other components, we introduced authLoading on CreateBase and deprecated loading.
Thanks to your detailed explanation, @fzaninotto , I now understand why the code is as it is.
In light of your explanation, the documentation of Create and EditBase now make sense.
So, there are loading, authLoading, and saving properties. The confusion stems from the fact that saving is not grouped with the other two on the component. Is there any chance they could all be grouped under the controller flags?
authLoading could also be renamed as authChecking. This is the wording used in the documentation. authChecking would decouple it from the "loading" vocable.
As for the immediate issue, I think the confusion could be resolved by rewording the deprecation comment in CreateBase. Something along the line:
@deprecated Renamed to authLoading because "loading" is used by EditBase for loading the data to edit
The confusion stems from the fact that saving is not grouped with the other two on the component. Is there any chance they could all be grouped under the controller flags?
I don't understand this question. What group are you talking about?
authLoading could also be renamed as authChecking. This is the wording used in the documentation. authChecking would decouple it from the "loading" vocable.
This would be a breaking change so we won't move forward with this idea
the confusion could be resolved by rewording the deprecation comment in CreateBase.
Maybe, but IMO the alternative you propose brings more confusion. Why mention EditBase in the CreateBase component?
I don't understand this question. What group are you talking about?
To answer that question, I need to summarize the discussion in this issue.
I opened this issue because I had to work on some old code <Create loading={loading}>. The IDE indicated that loading was deprecated. I looked at the deprecation notice but I couldn't understand it. The same flag on EditBase isn't deprecated despite authLoading being present on both components. So, why replace loading with authLoading on CreateBase but not on EditBase?
It seems the original intention is to discourage external control of loading state in favor of controller-driven flags, except for authLoading which is a special case.
You (@fzaninotto) explained what the loading flag does and why it is not the same as authLoading despite the deprecation notice saying otherwise.
Both your explanations lead to my observation that some flags (saving, isFetching, isPending) are provided by useCreateController/useEditController whereas authLoading and loading are provided by <CreateBase>/<EditBase>. This discrepancy may be historical or technical, but it looks cumbersome and plays a good part in my misunderstanding of the purpose of the loading flag.
At this point, I think this issue is merely a documentation and wording issue not worth pursuing unless others stumble on it too.
Activity
Will-thom commentedon Apr 22, 2026
Hi, fmarchalemisys.
From what I understand, the issue is about the inconsistency between CreateBase and EditBase regarding the
loadingprop.In CreateBase,
loadingis already marked as deprecated in favor ofauthLoading, while in EditBase it is still present and actively used.This creates an inconsistent API surface across similar controller components (Create vs Edit), even though both are now driven by controller state (useCreateController / useEditController).
It seems the original intention is to discourage external control of loading state in favor of controller-driven flags, except for authLoading which is a special case.
Should the expected direction be:
loadingentirely from both CreateBase and EditBase, orfmarchalemisys commentedon Apr 22, 2026
Hi @Will-thom
I expect to see the
loadingproperty next toauthLoadingor both to be deprecated in favor of a new mechanism.As a developer using the API, I don't understand why one should be treated differently than the other.
It is confusing to see that
authLoadingis documented on the<Create>page but noloadingproperty is documented. If none were documented, I would have started looking through the doc for a way of showing the loading indicator. When I sawauthLoadingin the doc, I dig into the source code and found the comment saying to useauthLoadinginstead ofloading. That makes no sense as they should serve different purposes.Will-thom commentedon Apr 22, 2026
Hi @fmarchalemisys
Thanks for the clarification — I understand the concern around the semantic ambiguity between
authLoadingandloading.To avoid turning this into a larger redesign discussion, I’d like to propose a minimal alignment step:
Option A (incremental, low risk):
loadingin EditBase (same as CreateBase)authLoadingas-isOption B (slightly more forward-looking):
loadingin both CreateBase and EditBaseThis PR would implement Option A unless you prefer otherwise.
If this direction sounds reasonable, I’ll proceed with a focused PR.
fmarchalemisys commentedon Apr 22, 2026
Hi @Will-thom
Option A sounds good to me. At least, it won't look like
loadingwas deprecated by mistake onCreateBase.Can you also update the deprecation comment to state that
loadingis replaced with thesavingboolean returned byuseCreateController?Will-thom commentedon Apr 22, 2026
Hi @fmarchalemisys
Thanks for the guidance — this makes sense.
Apologies for the delay, I’ve been a bit short on time, but I’m still planning to take care of this.
I’ll proceed with the changes (deprecating
loadingin EditBase and updating the deprecation comments) and open a PR shortly.Will-thom commentedon Apr 27, 2026
Hi @fmarchalemisys
I've implemented Option A and updated the deprecation comments to clarify that
loadingis replaced by thesavingstate from the controller, as suggested.PR Details:
chore: deprecate loading prop in EditBase and clarify usage #11249
fzaninotto commentedon Apr 28, 2026
The origin of the deprecation lies in #10880.
The idea is that we introduced a
loadingprop for when the data is loading, and renaned the oldloadingprop, which was the component displayed while the auth propvider is checked, toauthLoading. To make the change backwards compatible,authLoadingtakes theloadingvalue by default.But
CreateBaseis particular: there is no data to load. So it can't really have the same syntax as the other Base components as there is no dataloadingprop. To be consistent with the other components, we introducedauthLoadingon CreateBase and deprecatedloading.So in my opinion there is no error in the code.
fmarchalemisys commentedon Apr 29, 2026
Thanks to your detailed explanation, @fzaninotto , I now understand why the code is as it is.
In light of your explanation, the documentation of Create and EditBase now make sense.
So, there are
loading,authLoading, andsavingproperties. The confusion stems from the fact thatsavingis not grouped with the other two on the component. Is there any chance they could all be grouped under the controller flags?authLoadingcould also be renamed asauthChecking. This is the wording used in the documentation.authCheckingwould decouple it from the "loading" vocable.As for the immediate issue, I think the confusion could be resolved by rewording the deprecation comment in
CreateBase. Something along the line:fzaninotto commentedon Apr 29, 2026
I don't understand this question. What group are you talking about?
This would be a breaking change so we won't move forward with this idea
Maybe, but IMO the alternative you propose brings more confusion. Why mention EditBase in the CreateBase component?
fmarchalemisys commentedon Apr 29, 2026
To answer that question, I need to summarize the discussion in this issue.
I opened this issue because I had to work on some old code
<Create loading={loading}>. The IDE indicated thatloadingwas deprecated. I looked at the deprecation notice but I couldn't understand it. The same flag onEditBaseisn't deprecated despiteauthLoadingbeing present on both components. So, why replaceloadingwithauthLoadingonCreateBasebut not onEditBase?@Will-thom explained it as follows:
You (@fzaninotto) explained what the
loadingflag does and why it is not the same asauthLoadingdespite the deprecation notice saying otherwise.Both your explanations lead to my observation that some flags (
saving,isFetching,isPending) are provided byuseCreateController/useEditControllerwhereasauthLoadingandloadingare provided by<CreateBase>/<EditBase>. This discrepancy may be historical or technical, but it looks cumbersome and plays a good part in my misunderstanding of the purpose of theloadingflag.At this point, I think this issue is merely a documentation and wording issue not worth pursuing unless others stumble on it too.
Thanks for the clarification.
fzaninotto commentedon Apr 29, 2026
The separation between the controller and components is correct IMO: