I saw several examples on the web of tutorials using redux and react where the code of omitting the semicolon when using es6 with babel.
Example semicolon at the end of import, export.
- What is the reason?
- What is a good practice?
Missing semicolon
import React, { PropTypes } from 'react'
const Location = ({ onClick, name, country}) => (
<li
onClick={onClick}
>
{name} {country}
</li>
)
export default Location
vs with semicolon
import React, { PropTypes } from 'react';
const Location = ({ onClick, name, country}) => (
<li
onClick={onClick}
>
{name} {country}
</li>
);
export default Location;