JSX a little bit shorter:
export default ({title}) => <h1>{title}</h1>;
Don't need two declaration to write one thing.
This is fine if you don't use TypeScript ;)
I don't personally like arrow functions for this sort of thing.
Yes you right that is attitude depend. I use arrows most of times, speciel this cases:
const chunk = block => arr => Array(Math.ceil( arr.length / block)) .fill() .map( (_,i) => arr.slice(i * block, i * block + block));
where I can use dependency injection with arrow functions chain.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
JSX a little bit shorter:
Don't need two declaration to write one thing.
This is fine if you don't use TypeScript ;)
I don't personally like arrow functions for this sort of thing.
Yes you right that is attitude depend. I use arrows most of times, speciel this cases:
where I can use dependency injection with arrow functions chain.