Re:Angular 2 Final Released
by devdoomari on Saturday September 17, 2016 @06:49AM
(#12519988)
re:learned a lot about how to build reusable components myself from their API
material-ui's tutorials are really bad examples on this.
They teach you to import from specific dir path inside material-ui.
(e.g. import Pen from 'material-ui/lib/pen' or whatever)
Instead, they should recommend:
import { Pen } from 'material-ui'
since most of their exports are already in material-ui/src/index.js file (or some index.js file from package.json's main part)
material-ui's tutorials are really bad examples on this. They teach you to import from specific dir path inside material-ui. (e.g. import Pen from 'material-ui/lib/pen' or whatever)
Instead, they should recommend: import { Pen } from 'material-ui' since most of their exports are already in material-ui/src/index.js file (or some index.js file from package.json's main part)