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
| // Примеры запросов к api | |
| // Сохранить результаты - {name: 'Stefan Butler', value: 666} | |
| fetch('http://84.201.155.153/players', { | |
| method: 'POST', | |
| // Тело запроса должно содержать два поля: name и value | |
| body: JSON.stringify( | |
| {name: 'Stefan Butler', value: 666} | |
| ), | |
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
| .editor-text | |
| .scanlines |
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
| import React, { Component } from 'react'; | |
| import styled from 'styled-components'; | |
| const Heder = styled.div` | |
| color: red; | |
| `; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <Heder>Hello world</Heder> |
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
| function dataprovider(url: string, text: string, cb: Function) { | |
| cb([1, 2, 3]) | |
| } | |
| return ( | |
| <TextInput | |
| theme="normal" | |
| size="m" |
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
| Ну вот смотри есть тип c двумя полями: | |
| type Entity = { | |
| name: string, | |
| id: number | |
| } | |
| Ты, напрмер, пишешь экшен который использует этот тип чтобы поменять существующий объект: | |
| const editEntity = (entity: Entity): Entity => ({name: 'bazz', id: 2}); |
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
| import {Button as LegoButton} from 'lego-on-react'; | |
| import * as React from 'react'; | |
| import styled from 'styled-components'; | |
| const StyledButtonWrpapper = styled.div` | |
| & .button { | |
| line-height: 10px; | |
| } | |
| `; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <style> | |
| .container { | |
| display: flex; |
NewerOlder