Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created March 15, 2018 02:26
Show Gist options
  • Save jwoertink/1097b8a1e9b24d0ac21359d4de2b321f to your computer and use it in GitHub Desktop.
Save jwoertink/1097b8a1e9b24d0ac21359d4de2b321f to your computer and use it in GitHub Desktop.
Which style do you prefer for your React Class?
// Sample A. Inline export with implicit import
import React from 'react';
export default class SampleA extends React.Component {
}
// Sample B. Inline export with explicit import
import React, { Component } from 'react';
export default class SampleB extends Component {
}
// Sample C. EOF export with implicit import
import React from 'react';
class SampleC extends React.Component {
}
export default SampleC
// Sample D. EOF export with explicit import
import React, { Component } from 'react';
class SampleD extends Component {
}
export default SampleD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment