Daniel Hejl
React Synthetic Event System
productboard
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Proč je potřeba?
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Performance
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Kompatabilita napříč browsery
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Vyšší úroveň abstrakce
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Jak je napsaný?
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
SyntheticEvent
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Event Pluginy
DOM - SimpleEventPlugin - TapEventPlugin - EnterLeaveEventPlugin - ChangeEventPlugin - SelectEventPlugin - BeforeInputEventPlugin
DOM / React Native - ResponderEventPlugin
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
ResponderEventPlugin
https://facebook.github.io/react-native/docs/ gesture-responder-system.html
https://facebook.github.io/react-native/docs/ panresponder.html
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Na co si dát pozor?
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
element.addEventListener
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Event Pooling
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Ne všechny eventy mají
dokonalý polyfill
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
el.addEventListener(‘click', process, false); —> <Component onClick={process} />
el.addEventListener(‘click', process, true); —> ?????
Quiz time!
Jak zachytit event v capture fázi?
productboard Copyright © 2015 ProductBoard, Inc. All rights reserved.
Díky moc!
@danhejl
www.productboard.com