Skip to content

Instantly share code, notes, and snippets.

View riedel28's full-sized avatar

Sergey Riedel riedel28

  • Nuremberg, Germany
View GitHub Profile
const formatNumber = num => `0${num}`.slice(-2)
@riedel28
riedel28 / useFetch
Last active December 10, 2019 20:26
useFetch Hook
import { useState, useEffect } from "react";
export default function useFetch(url) {
const [loading, setLoading] = useState(true);
const [data, setData] = useState(null);
const [error, setError] = useState(null);
useEffect(() => {
setLoading(true);
'use strict';
const characters = [
{ id: 1, name: 'ironman' },
{ id: 2, name: 'black_widow' },
{ id: 3, name: 'captain_america' },
{ id: 4, name: 'captain_america' },
];
function getCharacter(name) {
@riedel28
riedel28 / test_front.md
Created May 29, 2017 08:42 — forked from beshkenadze/test_front.md
Тестовое задание для Frontend-разработчика

##Погодное одностраничное веб-приложение

(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.

Приложение должно уметь:

  • Добавлять/удалять города
  • Сохранять локально данные
  • Автоматически запрашивать погоду по координатам пользователя - это город/место по умолчанию.
@riedel28
riedel28 / frontendDevlopmentBookmarks.md
Created April 1, 2017 16:14 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@riedel28
riedel28 / LICENSE
Created March 26, 2017 19:04 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: