Summary explainer: facebook/react#20031 (comment)
Input:
<ComponentA />;
<ComponentD prop="A" key="K" />;
<ComponentB {...props} />;
;
<!doctype html> | |
<html lang="en"> | |
<body> | |
<script> | |
const sagaMiddleware = store => gen => { | |
var resolve, reject | |
var done = new Promise((res, rej) => { | |
resolve = res |
const daggy = require('daggy') | |
const Task = require('data.task') | |
const _ = require('lodash') | |
const kleisli_comp = (f, g) => x => f(x).chain(g) | |
const compose = (f, g) => x => f(g(x)) | |
const id = x => x | |
//=============FREE============= | |
const Free = daggy.taggedSum({Impure: ['x', 'f'], Pure: ['x']}) | |
const {Impure, Pure} = Free |
Summary explainer: facebook/react#20031 (comment)
Input:
<ComponentA />;
<ComponentD prop="A" key="K" />;
<ComponentB {...props} />;
;
sealed trait Interact[A] | |
case class Ask(prompt: String) | |
extends Interact[String] | |
case class Tell(msg: String) | |
extends Interact[Unit] | |
trait Monad[M[_]] { | |
def pure[A](a: A): M[A] |
import MomentUtils from '@date-io/moment'; | |
class MomentUTCUtils extends MomentUtils { | |
format(value, formatString) { | |
return this.moment.utc(value).format(formatString); | |
} | |
parse(value: string, format: string) { | |
if (value === '') { | |
return null; |
(I'm enjoying doing these raw, barely edited writeups; I hope they're useful to you too)
This is my own writeup on feature flags; for a deep dive I'd recommend something like Martin Fowler's article (https://martinfowler.com/articles/feature-toggles.html).
So. Feature flags. The basic idea that you'll store configuration/values on a database/service somewhere, and by changing those values, you can change the user experience/features for a user on the fly.
Let's say that you're building a new feature, called 'new-button' which changes the color of buttons, which is currently red, to blue. Then you'd change code that looks like this -
https://twitter.com/snookca/status/1073299331262889984?s=21
Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows.
(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)
So the big deal about css-in-js (cij) is selectors.
const daggy = require('daggy') | |
const compose = (f, g) => x => f(g(x)) | |
const id = x => x | |
const kleisli_comp = (f, g) => x => f(x).chain(g) | |
//=============FREE============= | |
const Free = daggy.taggedSum({Impure: ['x', 'f'], Pure: ['x']}) | |
const {Impure, Pure} = Free |
invoices/123
?
in a URL like /assignments?showGrades=1
.#
portion of the URL. This is not available to servers in request.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.