You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking of adding an optional flag when using component generator, something like --full, that will boilerplate the most used react stages etc, that I find myself tediously writing every time.
This is even more useful when using Reflux (btw, just added a pull request with Reflux support)
It should be something like this:
'use strict';
var React = require('react/addons');
//if (architecture=== 'reflux')
var Reflux = require('reflux');
//var Actions = require('actions/...');
//if (stylesLanguage === 'sass')
require('styles/componentName.sass');
var componentName = React.createClass({
//if (architecture=== 'reflux')
mixins: [Reflux.ListenerMixin],
getInitialState: function () {
return { };
},
componentDidMount: function () {
},
render: function () {
return (
<div>
<p>Content for componentName </p>
</div>
);
}
});
discussion
I use getInitialState and componentDidMount, and reflux stuff all the time, what's yours boiler-plated code?
what will be a proper name for this option (e.g --full)
I think react-webpack:component is quite a lot of text. We can create an alias. like react-webpack:cmp or react-webpack:c - what do you think will be suitable? (and what about react-webpack:action and react-webpack:store?)
The text was updated successfully, but these errors were encountered:
I'm thinking of adding an optional flag when using component generator, something like
--full
, that will boilerplate the most used react stages etc, that I find myself tediously writing every time.This is even more useful when using Reflux (btw, just added a pull request with Reflux support)
It should be something like this:
discussion
getInitialState
andcomponentDidMount
, and reflux stuff all the time, what's yours boiler-plated code?--full
)react-webpack:component
is quite a lot of text. We can create an alias. likereact-webpack:cmp
orreact-webpack:c
- what do you think will be suitable? (and what aboutreact-webpack:action
andreact-webpack:store
?)The text was updated successfully, but these errors were encountered: