File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,12 @@ export default PureMadadata;
312
312
}
313
313
```
314
314
315
+ * prefer using isolated statement for defaultState when declaring reducer
316
+ ```
317
+ const initialState = { isFetching: false };
318
+ export default function reducer(state = initialState, action) {}
319
+ ```
320
+
315
321
* proposes
316
322
* prefer using ES6 Symbol for action type.
317
323
@@ -320,3 +326,19 @@ export default PureMadadata;
320
326
```
321
327
322
328
so that we don't have to type long words and disable eslint-max-len. Any there will be no name clashes.
329
+
330
+ # Import
331
+
332
+ * prefer specific import first and default import next
333
+
334
+ ```
335
+ import React, { PropTypes, Component } from 'react';
336
+ import { connect } from 'react-redux';
337
+ import { showCredentials, hideCredentials } from '../../modules/credentials/action';
338
+ import { showDetails, hideDetails } from '../../modules/details/action';
339
+ import { hideScheduling } from '../../modules/scheduling/action';
340
+ import { hideNamingNDescribing } from '../../modules/namingndescribing/action';
341
+ import Collapse from 'react-collapse';
342
+ import MDButton from 'mdbutton';
343
+ import styles from '../App/App.css';
344
+ ```
You can’t perform that action at this time.
0 commit comments