Skip to content

Instantly share code, notes, and snippets.

View Danetag's full-sized avatar
🕺
Entertaining

Arnaud Tanielian Danetag

🕺
Entertaining
View GitHub Profile
@abhayarawal
abhayarawal / hooks.jsx
Last active July 15, 2019 18:27
react hooks with xstate and redux
import React, { useState, useEffect, useMemo, useReducer, useContext, useCallback } from 'react'
import { composeWithDevTools } from 'redux-devtools-extension'
import { createStore } from 'redux'
import { createSelector } from 'reselect'
import { Provider, shallowEqual, useSelector, useDispatch } from 'react-redux'
import { Machine, interpret, assign } from 'xstate'
import ReactDOM from 'react-dom'
const initialState = {