Example.js 669 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3. function Example() {
  4. return (
  5. <div className="container">
  6. <div className="row justify-content-center">
  7. <div className="col-md-8">
  8. <div className="card">
  9. <div className="card-header">Example Component</div>
  10. <div className="card-body">I'm an example component!</div>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. );
  16. }
  17. export default Example;
  18. if (document.getElementById('example')) {
  19. ReactDOM.render(<Example />, document.getElementById('example'));
  20. }