WebAssembly (aka wasm) is a new, standardized compilation target for the web, available in all modern browsers. But since it's so low level it can be difficult to see how it will revolutionize the future generations of React apps and potentially even power React itself. In this talk Jay will reveal what it is, how you can use it today, and the incredible opportunities it will continue to unlock.
Reactive programming nut and compiler enthusiast. Jay is a Senior Software Engineer at Netflix. Lover of all things open source, his contributions span numerous ecosystems. Former RxJS core team member and author of core-decorators, git-blame-someone-else, and co-author of redux-observable.
29. Jay Phelps | @_jayphelps
You'll likely consume compiled
WebAssembly binaries even sooner
30. Jay Phelps | @_jayphelps
Oxidizing Source Maps with Rust and WebAssembly
https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/
5.89 times faster!
109. Jay Phelps | @_jayphelps
• pause work and come back to it later
Fiber
110. Jay Phelps | @_jayphelps
• pause work and come back to it later
• assign priority to different types of work
Fiber
111. Jay Phelps | @_jayphelps
• pause work and come back to it later
• assign priority to different types of work
• reuse previously completed work
Fiber
112. Jay Phelps | @_jayphelps
• pause work and come back to it later
• assign priority to different types of work
• reuse previously completed work
• abort work if it's no longer needed
Fiber
113. Jay Phelps | @_jayphelps
Lin Clark - A Cartoon Intro to Fiber
https://goo.gl/bXsYhY
114. Jay Phelps | @_jayphelps
Ember’s “Glimmer” VM is being written in Rust
compiled to WebAssembly
115. Jay Phelps | @_jayphelps
React components could run in WebAssembly
e.g. writing them in Reason
116. Jay Phelps | @_jayphelps
let component = ReasonReact.statelessComponent("Page");
let handleClick = (_event, _self) => Js.log("clicked!");
let make = (~message, _children) => {
...component,
render: self =>
<div onClick={self.handle(handleClick)}>
{ReasonReact.stringToElement(message)}
</div>
};
117. Jay Phelps | @_jayphelps
This is possible right now, but not yet ideal
missing direct access to the DOM