Skip to content

Instantly share code, notes, and snippets.

@ohanhi
Last active May 6, 2024 05:21
Show Gist options
  • Select an option

  • Save ohanhi/d103ee7dcbe51e803d6c to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

👍 👍 👍 👍 👍 👍

@ericelliott

Copy link
Copy Markdown

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

@abelsoares

Copy link
Copy Markdown

⭐️

@svenheden

Copy link
Copy Markdown

⭐ ⭐ ⭐

@JamieDixon

Copy link
Copy Markdown

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

@thoreinstein

Copy link
Copy Markdown

🌟

@chrisbuttery

Copy link
Copy Markdown

@tomek-he-him

Copy link
Copy Markdown

@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 Markdown

🌟

ghost commented Oct 14, 2015

Copy link
Copy Markdown

⭐⭐⭐⭐⭐. 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

ohanhi commented Oct 15, 2015

Copy link
Copy Markdown
Author

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

@Deimos28

Copy link
Copy Markdown

@tomek-he-him

Copy link
Copy Markdown

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

@ohanhi

ohanhi commented Oct 15, 2015

Copy link
Copy Markdown
Author

@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

sporto commented Oct 18, 2015

Copy link
Copy Markdown

🌟

@jbelmont

Copy link
Copy Markdown

@rafaelrinaldi

Copy link
Copy Markdown

✨ 👍 💫

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