HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

React without memo

React Conf1 HN recommender · recommended in 1 month, 2022-2023
YouTube
150K views · 4 years ago · talk · dated

A React Conf talk by Xuan Huang previewing React Forget, a compiler that automatically memoizes components. It argues for making memoization the default so developers need not write useMemo or useCallback by hand.

Shared in discussions of useCallback and memoization as the first look at where React was heading with an auto-memoizing compiler.

Web developmentCompilers, interpreters & program analysisSoftware performance & optimization#reactforget#compiler#usememo#react#performance

3 comments from Hacker News

@matvp2023 · in “Next.js 13.4”

There isn't much info out there yet, but this video is a small preview: ▶ this video The latest update is mentioned in the March 2023 blog post: link

CitesView on HN
@ksbrooksjr2022 · in “Ten Years of TypeScript”

I agree that the typescript team should consider using the compiler to extend javascript rather than just supplement it with types. Like you said, there are technically parts of typescript that don't have a direct corollary in js (enums/namespaces), so why not take it a step further and add some of the features that js is missing? The only example where they've really taken that next step is with experimental decorators. I think in general the js/ts community is starting to realize that if we're going to have all of these build tools, we might as well use them to do more than just format, transpile, and bundle. Svelte has sort of pushed this idea with its abuse of the js label feature (it can detect when a variable is reassigned if you prefix it with the dollar sign label, which is technically not possible with js, even with proxies). There's also React Forget, which is promising to completely rewrite components at compile-time to avoid all of the gotchas that hooks have (and improve performance) [1]. In terms of making all of ts erasable, you can technically just write all your type definitions using js-doc comments, in which case the compiler can just be run with the --noEmit flag, and then the code is fully valid js without any modifications. [1] ▶ this video

CitesView on HN
@brundolf2022 · in “Not using useCallback is premature optimization”

For those pushing back, I wanted to share this talk given at a recent React Conf: ▶ this video The idea (still just an internal prototype) is that one day your compiler might automatically memoize all React components and intermediate values for you. It obviously would be great to skip all the syntax noise, as well as the linter-enforced rules around correctly maintaining dependency arrays, etc. But I think a big takeaway from this talk is that the React team sees memoizing as the norm . It is something to do by default , so much so that it may happen without your intervention one day. Immutability and value identity-based comparison are core to React. Violating these is the only way memoization can result in bugs (as some in this thread are worried about), and if you aren't following them then a lot of your React code is only working by accident to begin with, memo or no memo.

RecommendsView on HN
React.js Conf 2015 - Hype!31:17

React.js Conf 2015 - Hype!

Meta Developers
108K views • 11 years ago
React.js Conf 2015 - Immutable Data and React31:11

React.js Conf 2015 - Immutable Data and React

Meta Developers
159K views • 11 years ago
A 10x faster TypeScript13:45

A 10x faster TypeScript

Microsoft Developer
608K views • 1 year ago
Dan Abramov - Live React: Hot Reloading with Time Travel at react-europe 201530:41

Dan Abramov - Live React: Hot Reloading with Time Travel at react-europe 2015

ReactEurope
472K views • 11 years ago
Cheng Lou - On the Spectrum of Abstraction at react-europe 201635:32

Cheng Lou - On the Spectrum of Abstraction at react-europe 2016

ReactEurope
63K views • 10 years ago
React.js Conf 2016 - Ben Alpert - What Lies Ahead27:45

React.js Conf 2016 - Ben Alpert - What Lies Ahead

Meta Developers
50K views • 10 years ago
React Today and Tomorrow and  90% Cleaner React With Hooks1:35:30

React Today and Tomorrow and 90% Cleaner React With Hooks

React Conf
1.2M views • 8 years ago
React.js Conf 2015 - Beyond the DOM: How Netflix plans to enhance your television experience25:55

React.js Conf 2015 - Beyond the DOM: How Netflix plans to enhance your television experience

Meta Developers
26K views • 11 years ago
Sebastian Markbage: Minimal API Surface Area | JSConf EU 201424:28

Sebastian Markbage: Minimal API Surface Area | JSConf EU 2014

JSConf
71K views • 12 years ago
React.js Conf 2015 - The complementarity of React and Web Components25:47

React.js Conf 2015 - The complementarity of React and Web Components

Meta Developers
22K views • 11 years ago
Speed Up Your JavaScript56:23

Speed Up Your JavaScript

Google TechTalks
136K views • 17 years ago
Rich Harris - Rethinking reactivity36:45

Rich Harris - Rethinking reactivity

You Gotta Love Frontend
334K views • 7 years ago
Lin Clark - A Cartoon Intro to Fiber - React Conf 201731:48

Lin Clark - A Cartoon Intro to Fiber - React Conf 2017

Meta Developers
216K views • 9 years ago
Dan Abramov: Beyond React 16 | JSConf Iceland33:25

Dan Abramov: Beyond React 16 | JSConf Iceland

JSConf
139K views • 8 years ago
React.js Conf 2016 - Lightning Talks - Elie Rotenberg4:40

React.js Conf 2016 - Lightning Talks - Elie Rotenberg

Meta Developers
4K views • 10 years ago
Progressive Performance (Chrome Dev Summit 2016)35:42

Progressive Performance (Chrome Dev Summit 2016)

Chrome for Developers
34K views • 9 years ago
ClojureScript in the Age of TypeScript — David Nolen59:31

ClojureScript in the Age of TypeScript — David Nolen

ChariotSolutions
29K views • 5 years ago
The Truth about Rust/WebAssembly Performance29:47

The Truth about Rust/WebAssembly Performance

Greg Johnston
218K views • 3 years ago
Hacker Way: Rethinking Web App Development at Facebook44:36

Hacker Way: Rethinking Web App Development at Facebook

Meta Developers
900K views • 12 years ago
Hey Underscore, You're Doing It Wrong!36:31

Hey Underscore, You're Doing It Wrong!

InfoQ
141K views • 13 years ago