Skip to content

Instantly share code, notes, and snippets.

const MyWrapperMiddleware = store => next => action => {
const state = store.getState()
if (!state.isLoggedIn)
return next(action)
const pouchMiddleware = PouchMiddleware({
path: state.currentPath,
db,
import './style.css';
import React, { useState } from 'react';
import Spinner from 'react-md-spinner';
import useInterval from '../../utils/useInterval';
import { random } from 'lodash';
const labels = [
'מכוונים את הגיטרות',
'פורשים מחצלות',
@asfktz
asfktz / Tabs.jsx
Last active November 23, 2019 11:19
Context Based Tabs
import React, { Children, cloneElement, useState, createContext, useContext } from 'react';
const ctx = createContext();
export function Tabs ({ children }) {
const [selectedIndex, selectIndex] = useState(0);
return (
<ctx.Provider value={{ selectedIndex, selectIndex }}>
{children}
Aaa
Init -> Assignment has challenge?
Assignment has challenge?
yes -> Challenge
no -> Single Package
Challenge
start package -> Work
Work