prateekbh / preact-material-components

preact wrapper for "Material Components for the web"
https://material.preactjs.com
MIT License
553 stars 81 forks source link

2.0 - Root component should export all members #1244

Closed prateekbh closed 5 years ago

prateekbh commented 5 years ago

A component should export all of its members, user shouldn't have to specify a path to access any sub member.

e.g. https://github.com/prateekbh/preact-material-components/blob/2.0/packages/docs/src/routes/chips/index.js#L6-L8

Scope: All components

cromefire commented 5 years ago

It's to have less overhead, webpack should filter it out, but I don't know if everything has tree-shaking

prateekbh commented 5 years ago

Yep but it makes it super unintuitive. Most compilers/bundlers have tree shaking now, if not thats the users choice to have a bundler which does not do a very basic thing

prateekbh commented 5 years ago

This is mostly fixed now