- 2018 - The Year of Web Components, Dominik Kundel
- The Lonely and Dark Road to Styling in React, Sara Vieira
- Next Generation Forms with React Final Form, Erik Rasmussen
- The ABC of Coded Style Guides, Henning Muszynski
- Testing, Testing, 1, 2, NaN, Gant Laborde
- Lambdas, lambdas everywhere..., Flavio Corpa
| /* | |
| * Implement the following classic FP functions using | |
| * _only_ Array.prototype.{reduce|reduceRight}(). 🤓 | |
| */ | |
| const filter = f => xs => xs | |
| const map = f => xs => xs | |
| const every = f => xs => xs |
| // Ultimate version | |
| const curry = (f, ...args) => | |
| f.length <= args.length | |
| ? f(...args) | |
| : x => curry(f, ...args, x) |
| 'use strict' | |
| require('now-env') | |
| const Twit = require('twit') | |
| const Task = require('data.task') | |
| const Maybe = require('data.maybe') | |
| const bot = new Twit({ | |
| consumer_key: process.env.CONSUMER_KEY, | |
| consumer_secret: process.env.CONSUMER_SECRET, | |
| access_token: process.env.ACCESS_TOKEN, |
| license: gpl-3.0 | |
| height: 600 | |
| scrolling: no | |
| border: no |
https://twitter.com/snookca/status/1073299331262889984?s=21
“In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”
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.
| module Http.Extra exposing (..) | |
| import Http | |
| import Json.Decode | |
| {-| to obtain a String from `Http.task` | |
| Http.task | |
| { resolver = Http.stringResolver httpStringBodyResolver |
| git ls-files | grep \\.js$ | xargs wc -l |
| const curry = fn => { | |
| const arity = fn.length; | |
| const _curry = (...args) => | |
| args.length === arity | |
| ? fn(...args) | |
| : arg => _curry(...args, arg); | |
| return _curry(); | |
| } | |
| { | |
| "presets": [ | |
| "@babel/preset-react", | |
| [ | |
| "@babel/preset-env", | |
| { | |
| "targets": { | |
| "browsers": [ | |
| "last 2 versions", | |
| "ie >= 11" |