docs: named imports
See original GitHub issueDescription In the docs, the import of the module in the same namespace has been done using multiple import statements.
Current behaviour
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
Proposed Behaviour
import {AppBar, Toolbar, Typography, Button} from '@material-ui/core';
Why so Named imports help to keep track of imports from a specific package, as well as makes code a bit cleaner.
Let’s discuss: loudspeaker:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:19 (19 by maintainers)
Top Results From Across the Web
import - JavaScript - MDN Web Docs - Mozilla
Name of the exports to be imported. The name can be either an identifier or a string literal, depending on what module-name declares...
Read more >eslint-plugin-import/named.md at main - GitHub
Verifies that all named imports are part of the set of named exports in the referenced module. For export , verifies that all...
Read more >IMPORTHTML - Google Docs Editors Help
IMPORTXML : Imports data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds. IMPORTRANGE...
Read more >5. The import system — Python 3.11.1 documentation
The import statement combines two operations; it searches for the named module, then it binds the results of that search to a name...
Read more >What should you choose: named imports or default imports?
First, default imports are nameless. Or rather : it looses its name during exportation. Be it variables, constants, objects, classes, etc : they ......
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 Free
Top 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

I was on the fence here. I like the idea of demonstrating simplified imports for core, but I can understand the concern about “it depends” in general for icons.
On reflection, my gut feeling is that if the demos use differing approaches for core and icons, less experienced developers will follow the pattern shown, while more experienced developers will understand the difference.
Some actually write code themselves and don’t just copy&paste their apps.
Yeah like that worked in the past. It didn’t even work for this issue that got opened without any mention of the documented trade-offs.