Skip to content

Instantly share code, notes, and snippets.

import { createCookieSessionStorage } from "remix";
let { getSession, commitSession, destroySession } = createCookieSessionStorage({
cookie: {
name: "__session",
secrets: ["r3m1xr0ck5"]
}
});
export { getSession, commitSession, destroySession };
const pageMachine = Machine({
id: 'pageTransition',
initial: 'idle',
context: {
location: '/',
nextLocation: null,
data: {},
forms: new Map(),
error: null
@ryanflorence
ryanflorence / fasdfas
Created April 23, 2021 19:35
Created from Remix Form!
asdfasdf
@ryanflorence
ryanflorence / more stuff
Created April 23, 2021 19:35
Created from Remix Form!
blah blah
@ryanflorence
ryanflorence / no js
Created April 23, 2021 19:34
Created from Remix Form!
hey hey
@ryanflorence
ryanflorence / mutations.md
Created April 23, 2021 19:33
Created from Remix Form!

hello hello

@ryanflorence
ryanflorence / blah.md
Created April 23, 2021 19:32
Created from Remix Form!

hello hello

import type {
ActionFunction,
LinksFunction,
LoaderFunction,
MetaFunction
} from "@remix-run/react";
import {
Meta,
Links,
Scripts,
const path = require("path");
const express = require("express");
const compression = require("compression");
const morgan = require("morgan");
const { createRequestHandler } = require("@remix-run/express");
////////////////////////////////////////////////////////////////////////////////
let app = express();
app.use(compression());
enum State {
Idle,
LoadingJwt,
Success,
Error,
}
type Data = { error?: string; jwt?: string };
function Comp() {