Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. import React from "react";
  2. import { ReactTimerComponent, ReactHelloComponent } from '@hybrid/react-wrappers';
  3. import { HelloJSX } from '@hybrid/react-component-library'
  4. export class App extends React.Component {
  5. constructor(props) {
  6. super(props);
  7.  
  8. this.state = {
  9. name: "project-react",
  10. };
  11. }
  12.  
  13. componentDidMount() {
  14. setTimeout(() => {
  15. this.setState({ name: "project-angular-react" })
  16. }, 2000);
  17. }
  18.  
  19. onStuff(e) {
  20. console.log(`stuff happened ${e}`)
  21. }
  22.  
  23. render() {
  24. return (
  25. <div>
  26. <div style={{ textAlign: "center", fontSize: "xx-large" }}>
  27. <ReactHelloComponent name={this.state.name} stuff={this.onStuff}></ReactHelloComponent>
  28. <div>
  29. <ReactTimerComponent></ReactTimerComponent>
  30. </div>
  31.  
  32. <HelloJSX></HelloJSX>
  33. </div>
  34. </div>
  35. );
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement