Skip to content

Instantly share code, notes, and snippets.

View SirSerje's full-sized avatar
🏠
Working from home

Serhii Viazkov SirSerje

🏠
Working from home
View GitHub Profile
@treyhuffine
treyhuffine / withStorage.js
Last active March 4, 2024 21:01
A higher-order component to access localStorage
import React from 'react';
const withStorage = (WrappedComponent) => {
class HOC extends React.Component {
state = {
localStorageAvailable: false,
};
componentDidMount() {
this.checkLocalStorageExists();
@SirSerje
SirSerje / index.js
Last active July 5, 2018 20:20
@roman_mtb calendar example
const POSTS = [
{ id:1,
name: 'post dog',
date: {
time: [6, 3, 2018],
}
},
{ id:12,
name: 'post dog',
date: {