[Button] Change LoadingButton prop pending to loading
See original GitHub issueI’m very happy to see the new pre-release v5.0.0-alpha.1. I noticed something:
- The
Autocomplete
component has a prop calledloading
. - The
LoadingButton
component has a prop calledpending
.
For convention, I think all components should use the word loading
. Also it feels it makes sense after the component name
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:22 (17 by maintainers)
Top Results From Across the Web
[Button] Change LoadingButton prop pending to loading #21593
I noticed something: The Autocomplete component has a prop called loading . The LoadingButton component has a prop called pending .
Read more >LoadingButton API - Material UI - MUI
Rule name Global class Description
root.MuiLoadingButton‑root Styles applied to the root element.
fullWidth.MuiLoadingButton‑fullWidth Styles applied to the root element if fullWidth= .
endIcon.MuiLoadingButton‑endIcon Styles applied to...
Read more >How can I fix the problem of replacing button text with loading ...
I am using state to maintain the spinner. If data are fetched then the state viewInProgress has a false value. The state is...
Read more >MUI V5: Button (and the new Loading Button) - YouTube
In this video we go over one of the most used, and simplest Material UI V5 components there is, the Button component! This...
Read more >React Material UI Tutorial - 39 - Loading Button - YouTube
Courses - https://learn.codevolution.dev/ Support - https://www.paypal.me/Codevolution Github - https://github.com/gopinav⚡️ Checkout ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looking at the semantic, we have:
The use of pending echos back to https://reactjs.org/docs/concurrent-mode-patterns.html#the-three-steps.
I don’t have any strong preference, I think that we can settle this with a vote, the end goal is to make it intuitive to developers.
loading
pending
@eps1lon Are you arguing for
pending
only for the prop name or do you also think the component should be calledPendingButton
? If you are fine with the component name ofLoadingButton
, why do you feel differently about the prop?In what case is a transition pending when it isn’t because something (code or data) is loading?
I disagree. I don’t feel like either is broader. “pending” focuses on the state of transition, “loading” refers to why the transition is pending. Why haven’t we transitioned yet? Because we’re still loading something. So the question becomes, is it more intuitive to refer to the transition state or is it more intuitive to refer to the activity that is the cause of the transition state. I would argue that developers will ask, “what is the property I need to set to show that something is still loading?” more readily than asking “what is the property I need to set to indicate that my transition is in a pending state?”
In what way does using the term “loading” set the UI up for failure? If someone isn’t aware of the new capabilities provided by concurrent mode in React and how to use them, Material-UI using “pending” for this prop name isn’t going to make them more aware. And if a developer does understand the nuances of concurrent mode, Material-UI using “loading” for this prop name is not going to lead them astray.