react class component export code example
Example 1: export default react
import React from 'react'; // get the React object from the react module
class HelloWorld extends React.Component {
render() {
return Hello, world!
;
}
}
export default HelloWorld; // expose the HelloWorld component to other modules
Example 2: export default class react
import Template from './components/templates'
Example 3: export default class react
class Template {}
class AnotherTemplate {}
export { Template, AnotherTemplate }