This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.js': | |
'sdiv': | |
'prefix': 'sdiv' | |
'body': """ | |
const $1 = styled.div` | |
$0 | |
`; | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Написать функцию, которая принимает на вход любое количество отрезков, заданных двумя координатами, и возвращает `true`, если любые 2 отрезка пересекаются, иначе возвращает `false`. Пример вызова: `f({x1: 1, x2: 10}, {x1: 11, x2: 123}, {x1: 122, x2: 124}, ...)` | |
2) Написать HOC, который будет менять `document.title` страницы при рендеринге компонента, который оборачиваем в HOC, и устанавливать старый `title` (который был до рендеринга) при unmount. Пример вызова: `@titlePage('Some new title')` | |
3) Написать функцию, принимающую на вход 2 числа `a` и `b`, и возвращающая `x = a/b`, при этом | |
a) в `x` после запятой может быть максимум 2 цифры | |
b) в `x` все нули после запятой должны быть убраны | |
Проверки (в том числе на то что `a` и `b` являются числами) делать не нужно. | |
Функция должна добавлять `$` в начало ответа. | |
Примеры вызова функции: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// getContext.js | |
import React, {Component} from 'react'; | |
const {Provider, Consumer} = React.createContext(); | |
const getContext = keys => WrappedComponent => props => ( | |
<Consumer> | |
{state => ( | |
<WrappedComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x44B882617388e462A9d58A06F07e913fA341b385 |
NewerOlder