Skip to content

Instantly share code, notes, and snippets.

@ohanhi
Last active February 3, 2021 18:14
Show Gist options
  • Star 94 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohanhi/d103ee7dcbe51e803d6c to your computer and use it in GitHub Desktop.
Save ohanhi/d103ee7dcbe51e803d6c to your computer and use it in GitHub Desktop.
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views into more manageable pieces.

As the author of hyperscript-helpers and an avid user of Elm, I have fallen in love with functional UI composition. Inspired by @staltz's To JSX or not to JSX discussion, specifically this comment: "Most UI tree code should look small.", I would love to share the joys of applying functional programming principles into dynamic UI rendering.

@tomek-he-him
Copy link

👍 👍 👍 👍 👍 👍

@ericelliott
Copy link

⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️

@abelsoares
Copy link

⭐️

@svenheden
Copy link

⭐ ⭐ ⭐

@JamieDixon
Copy link

I would come along just for this talk! ⭐ 🌟 ⭐

@thoreinstein
Copy link

🌟

@chrisbuttery
Copy link

@tomek-he-him
Copy link

@JamieDixon 👍 That’s what I was thinking too!

Tweet the word folks! Surprizingly, one of my tweets has just reached a wide audience: https://twitter.com/TopReactJSNews/status/654153676433395712.

@ronnross
Copy link

🌟

Copy link

ghost commented Oct 14, 2015

⭐⭐⭐⭐⭐. I would give it five stars and add it to my Netflix queue if possible. You think you could make a point of touching upon how one could combine stateless UI composition with reading and writing data to a server/store?

@ohanhi
Copy link
Author

ohanhi commented Oct 15, 2015

@rkeurel Sure. I think keeping the UI and the data in sync is one of the greatest benefits of the approach.

@Deimos28
Copy link

@tomek-he-him
Copy link

@ohanhi, do you know what position we’re on in the race?

@ohanhi
Copy link
Author

ohanhi commented Oct 15, 2015

@tomekwi, Not really, no. I haven't found a list of all the proposals. But they told to tweet the link with #GoReactive, so you can try searching the tweets. I think we're doing pretty well, but see for yourself. :)

@sporto
Copy link

sporto commented Oct 18, 2015

🌟

@jbelmont
Copy link

@rafaelrinaldi
Copy link

✨ 👍 💫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment