rossmawd / react-dj

Create and Share YouTube playlists with friends!
0 stars 0 forks source link

Do not export on same line as the created class #3

Open gruckion opened 5 years ago

gruckion commented 5 years ago

https://github.com/rossmawd/react-dj/blob/62281562c28ad950471a874b2e0b386129864f1f/src/Components/ButtonAppBar.js#L29

Hi Ross,

Please see this issue. If you export a class on the same line you will loose information in the react developer tools.

https://github.com/facebook/react-devtools/issues/1307

Advised not to do

export default class Named { }

Doing this in two parts resolves the lost information issue.

class Named { }
export default Named;

https://github.com/facebook/react-devtools/issues/1307

gruckion commented 5 years ago

Same is applicable to

export default function Named() {}

export const Named = () => {}