Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ======================================================
- // Before transform
- function MyComponent(props) {
- const msg = "Hello " + props.user.name.first;
- return <PureChild onClick={() => alert(msg)} />
- }
- // ======================================================
- // After transform
- function _hoisted(_temp) {
- alert(_temp);
- }
- function MyComponent(props) {
- const msg = "Hello " + props.user.name.first;
- return <PureChild onClick={reflectiveBind(_hoisted, this, msg)} />
- }
Add Comment
Please, Sign In to add comment