Skip to content

Instantly share code, notes, and snippets.

View msell's full-sized avatar

Matt Sell msell

View GitHub Profile
@msell
msell / machine.js
Last active May 25, 2020 18:25
Generated by XState Viz: https://xstate.js.org/viz
// import { Machine } from "xstate";
const DEFAULT_DURATION = 5000;
const timerMachine = Machine(
{
id: "timer",
strict: true,
initial: "idle",
context: {
progress: 0,
elapsedTime: 0,

Expo Web Platform

Web Platform Options

  • Default Expo for Web
  • Next.js

The most confusing part about either choice is how to handle universal routing within an application. It seems that Expo's recommendation is to use react-router or next.js routing on web and react-navigation for native platforms. I would love to see just one good example app that demonstrates an approach to universal routing/navigation.

Only the Next.js default page-based routing is supported. You'll need to use a completely different routing solution to do native navigation. We strongly recommend react-navigation for this.

@msell
msell / machine.js
Last active April 7, 2020 04:26
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'aog',
initial: 'open',
context: {
},
states: {
open: {
initial: 'initial',
on: {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@msell
msell / machine.js
Last active February 12, 2020 01:19
Generated by XState Viz: https://xstate.js.org/viz
// send this event from Events tab to successfully login
// {
// "type": "SUBMIT_LOGIN",
// "email": "matt@gmail.com",
// "password": "abc123"
// }
@msell
msell / twittermute.txt
Created January 24, 2020 22:18 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@msell
msell / install-plugins.sh
Last active January 12, 2020 17:17
VSCode settings and extensions
code --install-extension RobinMalfait.prettier-eslint-vscode
code --install-extension TwentyChung.jsx
code --install-extension abusaidm.html-snippets
code --install-extension aeschli.vscode-css-formatter
code --install-extension apollographql.vscode-apollo
code --install-extension be5invis.toml
code --install-extension blanu.vscode-styled-jsx
code --install-extension christian-kohler.path-intellisense
code --install-extension cmstead.jsrefactor
code --install-extension CoenraadS.bracket-pair-colorizer
@msell
msell / machine.js
Last active December 20, 2019 03:35
Generated by XState Viz: https://xstate.js.org/viz
const canMerge = (context, event) => {
const {
minApprovals,
approvals,
changesRequested
} = context;
return !changesRequested && approvals >= minApprovals
};
@msell
msell / machine.js
Created December 16, 2019 17:18
Generated by XState Viz: https://xstate.js.org/viz
const controllerMachine = Machine({
id: 'aog_case',
initial: 'idle',
states: {
idle: {
on: {
INIT_CASE: {
target: 'creating',
}
},
@msell
msell / machine.js
Last active November 13, 2019 05:33
Generated by XState Viz: https://xstate.js.org/viz
const controllerMachine = Machine({
id: 'aog_case',
initial: 'idle',
states: {
idle: {
on: {
INIT_CASE: {
target: 'creating',
}
},