Comments (5)
@poteirard good point 👌🏻
We could do this as a first step?
Summarising pros and cons I can see from namepsacing:
Cons
- Need to remember structure to use them
- I guess TS integrations will hint to autocomplete with should make this less painful ?
<Icons />
by itself would rendernull
I guess 😏
Pros
- fewer imports ( as per the example above )
- better readability ? (
<Icons.ZopaLogo />
vs<ZopaLogoIcon />
)
from react-components.
fewer imports ( as per the example above)
That's not 100% true you can always do import * as RC from 'react-components';
and then <RC.ZopaLogo />
from react-components.
I agree with @lluia, it does make it clearer and easier to import
from react-components.
What if we export the icons with
ProfileIcon
instead then? I'm not a big fan of namespacing to be honest because you have to remember the structure/tree.
from react-components.
Addressed on 2.0
☝️
from react-components.
Related Issues (20)
- IconProp typings issue HOT 1
- Select does not stretch to fit the sized container
- react-styleguidist is always expecting a component to be exported
- ProductTemplate back button extensibility improvement HOT 9
- Removing the fallback to label
- Top-level data-automation in nav items is not rendered
- NavbarDropdown puts a <ul> as a direct child of a <ul>
- Aside should not be contained in another landmark
- The product template should contain appropriate landmarks HOT 1
- Navbar - hamburger menu not a button
- Warning about loading attribute when using FormButton HOT 1
- A11y violation in Navbar HOT 1
- Progress Bar Non-visual alternative HOT 1
- Navbar on hover showing buttons when CTAs disabled HOT 1
- Hamburger icon classes not applied correctly HOT 1
- Create a new section "helpers" HOT 1
- TextInput and it's label are not connected
- No longer use React.FC HOT 1
- Replace tippyjs with Floating UI
- Investigate fully removing babel from zrc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-components.