Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gruckion opened this issue Aug 18, 2019 · 1 comment
Open

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

gruckion opened this issue Aug 18, 2019 · 1 comment

Comments

@gruckion
Copy link

gruckion commented Aug 18, 2019

export default function ButtonAppBar() {

Hi Ross,

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

facebook/react-devtools#1307

Advised not to do

export default class Named { }

Doing this in two parts resolves the lost information issue.

class Named { }
export default Named;

facebook/react-devtools#1307

@gruckion
Copy link
Author

Same is applicable to

export default function Named() {}

export const Named = () => {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant