Created
March 15, 2018 02:26
-
-
Save jwoertink/1097b8a1e9b24d0ac21359d4de2b321f to your computer and use it in GitHub Desktop.
Which style do you prefer for your React Class?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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