- Варианты создания компонента (pureFunction, class, createElement)
- pureRender - знания принципа ререндера Реакт приложений при изменениях хранилищ, какие props приводят к неоправданному перерендеру, кеширование результатов функций
- Контейнер - его назначение, основные задачи, типовая структура
- Глупый компонент - его назначение, основные задачи, принцип разбиения на компоненты, функции
- React router - как создавать синхронный, асинхронный роутер, как отложить рендер компонента в Route на время загрузки, как работает функция match, как считывать параметры url ?q=1, #q=1 как их устанавливать при .
- Последовательность DOM render, последовательность вызова всех функций компонента, например componentDidMount, componentWillMount, componentWillReceiveProps и всех остальных. Как использовать ref, в какой момент он вызывается.
This file contains hidden or 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
| const fetchMachine = Machine({ | |
| id: 'fetch', | |
| initial: 'CLOSED', | |
| context: { | |
| retries: 0 | |
| }, | |
| states: { | |
| CLOSED: { | |
| on: { | |
| APP_PASSIVE_OPEN: 'LISTEN', |
This file contains hidden or 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
| let BitMessage = require("bitcoinjs-message"); | |
| var address = '1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN' | |
| var signature = 'HJLQlDWLyb1Ef8bQKEISzFbDAKctIlaqOpGbrk3YVtRsjmC61lpE5ErkPRUFtDKtx98vHFGUWlFhsh3DiW6N0rE' | |
| var message = 'This is an example of a signed message' | |
| function checkSignature(message, address, signature) { | |
| return new Promise((resolve,reject) => { | |
| let result = BitMessage.verify(message, address, signature); | |
| if(result) { |
This file contains hidden or 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
| /* | |
| Kraken-based ETH/XBT price ticker | |
| This contract keeps in storage an updated ETH/XBT price, | |
| which is updated every ~60 seconds. | |
| */ | |
| pragma solidity ^0.4.0; | |
| import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; |
This file contains hidden or 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
| 0x700F0094ef21Ad35EeE47117b46fBd1D52A215Ef |