Skip to content

Instantly share code, notes, and snippets.

View Dmitriy-8-Kireev's full-sized avatar
🎧
Working

DmytriyKireev Dmitriy-8-Kireev

🎧
Working
  • Moscow
View GitHub Profile
@Dmitriy-8-Kireev
Dmitriy-8-Kireev / Snippets.md
Created February 8, 2019 17:38
Full React/React Native/React Router/Redux/GraphQL/ES7/Testing/PropTypes snippets

react jsnew

@Dmitriy-8-Kireev
Dmitriy-8-Kireev / Readme.md
Last active February 10, 2019 17:11
Основы тестирования
@Dmitriy-8-Kireev
Dmitriy-8-Kireev / index.js
Last active February 6, 2019 09:48
Примеры возможного кода на Redux
......................................................................................................................................
Имена для action
GET_ _REQUEST получить запрос (запрос начался)
GET_ _SUCCESS получить успешный запрос (запрос получен)
{ type: 'FETCH_DATA_REQUEST' }
{ type: 'FETCH_DATA_FAILURE', error: 'Oops' }
{ type: 'FETCH_DATA_SUCCESS', payload: { ... }, meta: { ... } }
@Dmitriy-8-Kireev
Dmitriy-8-Kireev / Rest Api Fetch Api async await (проба пера:).js
Last active April 19, 2021 17:29
Мелочи по серверной части
// просто fetch
fetch("https://swapi.co/api/people/5")
.then(res => {
return res.json();
});
.then((body) => {
console.log(body)
})
// Асинхронная ф-ия
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">