Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

export default react

import React from 'react'; // get the React object from the react module

class HelloWorld extends React.Component {
  render() {
    return <p>Hello, world!</p>;
  }
}

export default HelloWorld; // expose the HelloWorld component to other modules
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #export #default #react
ADD COMMENT
Topic
Name
7+9 =