Why named imports/exports?
- Easier to find references to components
- Autocomplete
- Prevents typos
What does a named import look like?
import { Counter } from './Counter';
What does a default import look like?
import Counter from './Counter';
How to export a connected component?
export const _Counter () => {
...
}
export const Counter = compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(_Counter);
Top comments (0)