Guest User

Untitled

a guest
Oct 19th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // ======================================================
  2. // Before transform
  3.  
  4. function MyComponent(props) {
  5. const msg = "Hello " + props.user.name.first;
  6. return <PureChild onClick={() => alert(msg)} />
  7. }
  8.  
  9. // ======================================================
  10. // After transform
  11.  
  12. function _hoisted(_temp) {
  13. alert(_temp);
  14. }
  15.  
  16. function MyComponent(props) {
  17. const msg = "Hello " + props.user.name.first;
  18. return <PureChild onClick={reflectiveBind(_hoisted, this, msg)} />
  19. }
Add Comment
Please, Sign In to add comment