Skip to content

Files

Latest commit

 

History

History
31 lines (21 loc) · 617 Bytes

only-export-components.md

File metadata and controls

31 lines (21 loc) · 617 Bytes

Pattern: Component not working with Fast Refresh

Issue: -

Description

Validate that your components can safely be updated with fast refresh.

Example of incorrect code:

export const foo = () => {};
export const Bar = () => <></>;

export default function () {}
export default compose()(MainComponent)

Example of correct code:

export default function Foo() {
  return <></>;
}

const foo = () => {};
export const Bar = () => <></>;

Further Reading