File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ class ReactMacro
524
524
{
525
525
case ' key' : key = expr ;
526
526
case ' ref' if (n .name .value != ' react.Fragment' ): ref = expr ;
527
- default : add (name , value );
527
+ default : add (name , expr );
528
528
}
529
529
}
530
530
}
Original file line number Diff line number Diff line change @@ -116,13 +116,15 @@ class ReactMacroTest
116
116
// TODO: further check; should fail at compile time atm
117
117
}
118
118
119
- @Test
119
+ @Test
120
120
public function interpolate_attributes ()
121
121
{
122
122
var answer = " 42" ;
123
123
var e = jsx (' <input name="question" value="the answer is $42" />' );
124
124
Assert .areEqual (e .props .value , ' the answer is $42' );
125
- // TODO: further check; should fail at compile time atm
125
+
126
+ var e = jsx (' <input name="question" value="the answer is ${answer }" />' );
127
+ Assert .areEqual (e .props .value , ' the answer is 42' );
126
128
}
127
129
128
130
@Test
You can’t perform that action at this time.
0 commit comments