kazagkazag
7/7/2016 - 10:17 AM

react-07.jsx

const MY_CONST = 44;
function doMagic(regularStuff) {
  return "magical stuff";
}

export class MyComponent extends Component {
  render() {
    return (
      <main>
        <p>Some text</p>
        <ImportedComponent />
        {"Text" + MY_CONST}
        {doMagic()}
        {[1,2,3].map((element) => {
          return element * 2;
        })}
        <button onClick={doMagic}>label</button>
        <button onClick={() => doMagic(event)}>label</button>
      </main>
    );
  }
}