Open leehankyeol opened 7 years ago
Underscore helps distinguish custom methods from React methods
how to import this lib & where ?
______________________________________________
const comments = this._getComments();
// Underscore
Underscore helps distinguish custom methods from React methods
New method that will return array of JSX elements
_getComments() {
const commentList = [
{ id: 1, author: 'Morgan McCircuit', body: 'Great picture!' },
{ id: 2, author: 'Bending Bender', body: 'Excellent stuff' }
];
return commentList.map(() => {
return (<Comment />);
});
}
______________________________________________
After coding for a while, my
bundle()
started to take about 4-5 seconds, which is quite a lot when developing an app. So I googled around and found out I can actually enable cache options for Browserify.In
gulpfile.bable.js
, I changed the following code (btw there're duplicatedwatchify.args.debug = true;
in the code.)into
and now bundling became much faster than before. Not really sure that what I've done makes sense so if there's anything wrong please let me know.
Always enjoying your courses and screencasts, thanks!