Skip to content

Instantly share code, notes, and snippets.

View ferdinandsalis's full-sized avatar
🎯
Focusing

Ferdinand Salis ferdinandsalis

🎯
Focusing
View GitHub Profile
@ferdinandsalis
ferdinandsalis / form.tsx
Created December 27, 2021 13:11
Multiple items form
import * as R from "ramda";
import { json, ActionFunction, Form, redirect, useActionData } from "remix";
export const action: ActionFunction = async ({ request }) => {
const formData = await request.formData();
let fields = {};
for (const [key, value] of formData.entries()) {
const path = key
.split(".")
mutation createClient(client: ClientInput!, organizationId: ID!) {
id
}
const machine = Machine(
{
id: 'auth',
initial: 'loading',
context: null,
states: {
loading: {
id: 'loading',
initial: 'start',
states: {
import React from 'react'
import revalidation from 'revalidation'
import gql from 'graphql-tag.macro'
import { filter } from 'graphql-anywhere'
import { curry } from 'ramda'
import { compose, withProps, withHandlers } from 'recompose'
import { graphql } from 'react-apollo'
import { Button } from '../common/styled'
import { getValue } from '../form/utils'
import { isRequired } from '../../utils/validation'

Keybase proof

I hereby claim:

  • I am ferdinandsalis on github.
  • I am ferdinand (https://keybase.io/ferdinand) on keybase.
  • I have a public key ASDhvt-MV4HBu4pPvGQknKMGXbophNYbO7U9QzePMmH7Xwo

To claim this, I am signing this object: