File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ ## Input
3+
4+ ``` javascript
5+ import idx from ' idx' ;
6+
7+ function Component (props ) {
8+ // the lambda should not be outlined
9+ const groupName = idx (props, _ => _ .group .label );
10+ return < div> {groupName}< / div> ;
11+ }
12+
13+ export const FIXTURE_ENTRYPOINT = {
14+ fn: Component,
15+ params: [{}],
16+ };
17+
18+ ```
19+
20+
21+ ## Error
22+
23+ ```
24+ The second argument supplied to `idx` must be an arrow function. (This is an error on an internal node. Probably an internal error.)
25+ ```
26+
27+
Original file line number Diff line number Diff line change 1+ import idx from 'idx' ;
2+
3+ function Component ( props ) {
4+ // the lambda should not be outlined
5+ const groupName = idx ( props , _ => _ . group . label ) ;
6+ return < div > { groupName } </ div > ;
7+ }
8+
9+ export const FIXTURE_ENTRYPOINT = {
10+ fn : Component ,
11+ params : [ { } ] ,
12+ } ;
You can’t perform that action at this time.
0 commit comments