aboutsummaryrefslogtreecommitdiff
path: root/src/test/fixtures/function-scope-bug.jsx
blob: 57c783d87e179abe0aa7ab27a8fc7b8010c73ef8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var Button = () => {
  return <div className="button">Button!</div>;
};

var Bar = () => {
  return (
    <div prop={1}>
      Plain text
      <div>
        &larr; A child div
        <Button>Red</Button>
      </div>
    </div>
  );
};

// This is where it failed.
var Baz = () => {
  return (
    <div prop={1}>
      Plain text
      <div>
        &larr; A child div
        <Button>Red</Button>
      </div>
    </div>
  );
};