NoFOMO
Search 中EN Sign in Sign up

Peaked at #2 Now #2

Compiling React Components to Functions

Shu compiled a Dashboard component into a real math function, inspired by Handwired, and explores what becomes possible.

Rank over time

Key points

  • @shuding compiled a <Dashboard/> component into a real math function, inspired by @_chenglou's Handwired project.
  • The dashboard is compiled once as a straight list of 2,608 operations with no branches or loops, following the approach of Handwired.
  • Every JS operation becomes a weighted sum, a product, a ReLU, or a step function.

Key points and the reaction summary are written by AI from the posts on this page. Check the original post. How we use AI

Original post

Shu @shuding 63.6K followers

UI and math time! UI = f(props) is the most famous line in React. But that f is JavaScript, not math. Inspired by @_chenglou’s Handwired project, I compiled a <Dashboard/> component into a real math function, and asked what becomes possible. https://t.co/huyWUwLCpx
Post image
332likes 31reposts 12replies 13.2Kviews

View on X Save

Top replies on X

Sign in to see 1 top replies from X

From @shuding and others. Spam removed, with English and Chinese translations.

Sign up free Have an account? Sign in

Discussion 0

No comments yet. Start the conversation.

Suggest a source

Is there a first-hand source we're missing, or a topic we should watch? Tell us. Once approved, everyone's board covers it.

@username or profile link