Skip to content

Instantly share code, notes, and snippets.

@swyxio
swyxio / final submission.md
Last active April 22, 2023 19:17
Why React is Not Reactive - React Rally CFP

This is the CFP for my React Rally talk, which was eventually accepted and given here: https://www.youtube.com/watch?v=nyFHR0dDZo0.

If you are a first time speaker, my CFP advice for new speakers is here.

Final Submission: Why React is not Reactive

Functional-reactive libraries like RxJS make it easy to understand how data changes, giving us tools to declaratively handle events and manage state. But while our render methods react to state changes, React isn’t reactive. Instead, we write imperative event-handlers, and trip up on gotchas like async setState and race conditions. Why? In this talk we build a Reactive React to show the difference between the "push" and "pull" paradigms of data flow and understand why React chooses to manage Scheduling as a core Design Principle, enabling awesome features like async rendering and Suspense!

Theme: This talk is a deep dive into React's core design principle around scheduling. Instead of abstr

@parkerault
parkerault / README.md
Last active March 14, 2018 20:37
Redux Modules w/ API Middleware

This is extracted from a project that's been in development for about two months; I tried to include just enough code to give you an idea how I restrict async operations to custom middleware and keep all actions synchronous and declarative. The original inspiration was the real-world example from redux. This isn't a terribly complicated example, but an action that kicks off a multi-step async function would have basically the same structure: the action provides whatever configuration is necessary to perform that task, and the middleware orchestrates the async control flow and dispatches intermediate actions as required. I know some people will say that moving async operations to a custom middleware instead of an action creator is just rearranging the deck chairs on the titanic, but in my experience it makes a huge difference as the project grows in complexity and prevents the action creators and reducers from devolving i

@acamino
acamino / README.md
Last active July 21, 2024 06:20
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@treble37
treble37 / presenters.md
Last active November 15, 2021 12:21 — forked from somebox/presenters.md
Thoughts About Rails Presenters
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@markerikson
markerikson / acemarke-jravaj-connect-discussion.md
Last active February 15, 2020 11:10
Reactiflux #redux discussion: top-down single connect vs multiple lower connects

May 12, 2016

[8:23 PM] jrajav:: Heya. I'm wondering what the function of components really are. Just don't fully understand - why not just pass in the state with something like store.subscribe( () => render( , document.getElementById('root') ) ) ?

[8:24 PM] jrajav:: Passing in dispatch functions as well

[8:24 PM] jrajav:: Then, split apart the state as appropriate further down for each subcomponent

[8:25 PM] jrajav:: If all of the components are pure, stateless functional components this approach should still be just as performant, right?

@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 23:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@jamtur01
jamtur01 / ladder.md
Last active July 4, 2024 19:31
Kickstarter Engineering Ladder
@andystanton
andystanton / Start up local Docker Machine on OSX automatically.md
Last active April 3, 2024 00:50
Start up local Docker Machine on OSX automatically.

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links