Update: Ariakit Styles is in alpha. If you want to try it, join us on Discord (see the #news
channel).
A list of company-related stuff—mission, core values, and culture—that I research before considering applying to a job.
Sure, it’s nearly impossible to find a company that will satisfy every single point, but it helps me at least in finding better matches against my personal preferences and values.
The list doesn’t follow any specific order.
- Smart and inspiring leaders (CEO, founders), over megalomaniacs and tyrants
- Driven by a good and meaningful mission/cause, over greed (betting/casinos, scammy cryptos...)
import browserslist from "browserslist"; | |
import compareVersions from "compare-versions"; | |
import bcd from "mdn-browser-compat-data"; | |
function normalizeVersion(version) { | |
return version.replace("≤", ""); | |
} | |
const browsersByBrowserslistId = new Map([ | |
/* Keys: https://github.com/browserslist/browserslist#browsers */ |
This loader optimizes the output of mini-css-extract-plugin
and/or css-loader
,
entirely removing the potentially large CSS classname mappings normally inlined into your bundle when using CSS Modules.
Run npm install constant-locals-loader
, then make these changes in your Webpack config:
module.exports = {
module: {
export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
// arrays | |
e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
// components | |
e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
// create notes | |
m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
// diff props |
import * as React from 'react'; | |
/** | |
* React.Ref uses the readonly type `React.RefObject` instead of | |
* `React.MutableRefObject`, We pretty much always assume ref objects are | |
* mutable (at least when we create them), so this type is a workaround so some | |
* of the weird mechanics of using refs with TS. | |
*/ | |
export type AssignableRef<ValueType> = | |
| { |
This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.
Agree? Disagree? Feel free to let me know at @JanStette.
Keep it simple, stupid. You ain't gonna need it.
I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
import { useState, useEffect, useCallback } from 'react' | |
function usePromise(createPromise) { | |
const [error, setError] = useState() | |
const [value, setValue] = useState() | |
useEffect(() => { | |
let current = true | |
createPromise().then( |