Tanguy Krotoff
Tanguy Krotoff
Make them independent .js files with @ts-check (or .ts files if easily possible): - jest.config.js - jest.setup.ts - babel.config.js - .browserslistrc - prettier.config.js - .prettierignore - .huskyrc.js - commitlint.config.js -...
In your [fetch-basic example](https://github.com/AnthumChris/fetch-progress-indicators/blob/efaaaf073bc6927a803e5963a92ba9b11a585cc0/fetch-basic/supported-browser.js) you read the response then "pipe" it to a new response: ```JavaScript ... return new Response( new ReadableStream({ start(controller) { const reader = response.body.getReader(); read(); function...
See https://github.com/zertosh/invariant See https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/__forks__/invariant.js
With v0.12, to stylize an input given its state (pending for example), you have to catch the events: ```TypeScript export class Input extends React.Component { [...] state: InputState = {...
See: - https://www.reddit.com/r/reactjs/comments/b8h7kv/form_validation_using_custom_react_hooks/ - https://www.frontendtyped.com/2019/03/31/react-ts - https://github.com/Upmostly/custom-react-hooks-form-validation In https://github.com/tkrotoff/react-form-with-constraints/blob/v0.12.0/examples/PlainOldReact/App.tsx#L57 use `e.target.name`? See https://github.com/Upmostly/custom-react-hooks-form-validation/blob/7d08e8b7d65f1387d42ae1632493b756f972f81c/src/useForm.js#L23
Redundant with `Field.hasErrors()` which leads to stupid code: https://github.com/tkrotoff/react-form-with-constraints/blob/1e9a57390ea5fb75472d7b0c208870abf2d97a93/packages/react-form-with-constraints/src/Input.tsx#L80
See [Introduction to Refs in React 16.3](https://medium.com/@sgroff04/introduction-to-refs-in-react-16-3-d94505b45a73) > Prior to React v16.3 the callback ref were the preferred way to create and use refs. [...] If you use an inline...
- New context API: https://reactjs.org/docs/context.html - Remove prop-types dependency - forwardRef: https://reactjs.org/docs/forwarding-refs.html - Strict mode: https://reactjs.org/docs/strict-mode.html - New component lifecycle methods: https://reactjs.org/docs/react-component.html - Deprecated methods: `componentWillMount()`, `componentWillUpdate()`, `componentWillReceiveProps()` - New...