Полезные ссылки:
- CSS Individual Transform Properties in Safari Technology Preview
- Finer grained control over CSS transforms with individual transform properties
Примеры:
| /** | |
| * An entity is just an ID. This is used to look up its associated | |
| * Components. | |
| */ | |
| export type Entity = number | |
| /** | |
| * A Component is a bundle of state. Each instance of a Component is | |
| * associated with a single Entity. |
| import { createReadStream } from 'fs'; | |
| async function * splitLines(inputStream) { | |
| let carry = ''; | |
| for await (const chunk of inputStream) { | |
| const lines = (carry + chunk).split('\n'); | |
| carry = lines.pop(); | |
| yield * lines; | |
| } |
Новая книга от одного из авторов культовой SICP (Gerald Jay Sussman) и principal author of Scheme (Chris Hanson) - «Software Design for Flexibility. How to Avoid Programming Yourself into a Corner». Авторы задаются «извечным» вопросом о гибкости кода и как ее достичь. Судя по оглавлению речь пойдет о различных техниках и подходах от комбинаторов до DSL и динамического программирования. Звучит очень интересно! https://mitpress.mit.edu/books/software-design-flexibility.
https://t.me/tripovozkiknig/62
Книга про то как делать DDD методами функционального программирования (на F#, но многие аспекты применимы к ЯП без статической типизации)
| import { Suspense, useLayoutEffect, useRef, useState } from 'react'; | |
| type IFrameProps = React.ComponentPropsWithRef<'iframe'> & { | |
| fallback?: JSX.Element; | |
| }; | |
| export function IFrame(props: IFrameProps) { | |
| const { fallback, ...rest } = props; | |
| return ( |
React.memo: https://reactjs.org/docs/react-api.html#reactmemouseState: https://reactjs.org/docs/hooks-reference.html#usestateReactFiberBeginWork: https://github.com/facebook/react/blob/56e9feead0f91075ba0a4f725c9e4e343bca1c67/packages/react-reconciler/src/ReactFiberBeginWork.new.js#L3219| 'use strict'; | |
| const myArrow = () => {}; | |
| const myFn = function () {}; | |
| class MyClass {}; | |
| const isArrowFunction = (fn) => { | |
| if (typeof fn !== 'function') { | |
| return false; |