The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
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
This is something I compiled during the last weeks while job hunting. If you miss something in this list, please fork or tell me on twitter and I'll add what's missing.
- Be careful with jobs that are not clear they hire outside US
- Look for job in niches (like SaaS job boards, language-specific communities, country-focused, and so on)
- Avoid Upwork (pay to work, no guaranteed results, often bad contracts) and Remote.com
- Remote.co is not Remote.com, remote.co is ok.
- There are companies that hire and act as a guild, but only pay as freelancer (X-team, Gun.io, and so on)
- Not really focused on freelancing, as it is to me more like a one-person business
See also:
Service | Type | Storage | Limitations |
---|---|---|---|
Amazon DynamoDB | 25 GB | ||
Amazon RDS | |||
Azure SQL Database | MS SQL Server | ||
👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
Я не пытался тут собрать все вопросы, которые хорошо бы задавать, а лишь те, что мне задавали (если не указано обратное), так что не неситесь жаловаться, что вы не нашли своих любимых и коварных. Так же, я не привожу список всяких логических задачек, которых, слава богу, было минимум и задачек с написанием кода на листке бумажки что, к сожалению, всё ещё распространено.
React:
- Жизненный цикл компонента? В какой метод какие аргументы приходят? Где и как лучше обновлять стейт?
- Что такое функциональный компонент и PureComponent? В чём разница?
- Что такое Redux?
- Что такое сайд-эффекты?
- Какие бывают миддлвары в Redux?
- Для чего нужен redux-thunk?
- На чём построена redux-saga (на генераторах) и для чего она нужна?
<!doctype html> | |
<html lang="ru"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="$helmet-placeholder$"> | |
<meta name="$sc-placeholder$"> | |
<style> |
// Пузырьковая сортировка | |
function bubbleSort(a){ | |
var n = a.length; | |
for (var i = 0; i < n-1; i++){ // Выполняется для каждого элемента массива, кроме последнего. | |
for (var j = 0; j < n-1-i; j++){ // Для всех последующих за текущим элементов | |
if (a[j+1] < a[j]){ // выпоняется проверка, и если следующий элемент меньше текущего | |
var t = a[j+1]; a[j+1] = a[j]; a[j] = t; // то эти элементы меняются местами. | |
} | |
} | |
} |