Request
{
"columns": [
{
"type": "month",
"values": ["01", "02", "03", "04", "05"]
},
"itemtype"
],
{
"columns": [
{
"type": "month",
"values": ["01", "02", "03", "04", "05"]
},
"itemtype"
],
export const fail = (reason) => Promise.resolve({ status: 'failed', reason }); | |
export const skip = (unresolvedDependencies) => | |
Promise.resolve({ status: 'skipped', unresolvedDependencies }); | |
export const succeed = (value) => | |
Promise.resolve({ status: 'resolved', value }); | |
export const categorize = (stack, [id, { status, value }]) => { | |
const type = status === 'resolved' ? status : 'unresolved'; |
import { object, string } from 'yup'; | |
import { useCallback, useMemo } from 'react'; | |
import { Helmet as Metatags } from 'react-helmet'; | |
import useForm from '../../../../macros/form/macro'; | |
import { Text } from 'components/widgets/fields'; | |
export const validationSchema = object().shape({ | |
email: string().trim().min(3).max(255).email().required(), | |
password: string().trim().min(10).max(50).required(), |
import { useCallback, useEffect, useRef, useState } from 'react' | |
import { attempt, fail, getInitialState, succeed } from './reducers' | |
import { Validity } from './helpers' | |
export default ({ promise }) => { | |
const { current: controller } = useRef(new AbortController()) | |
const [state, setState] = useState(getInitialState()) | |
const resolve = useCallback( |
import useAsync from './useAsync';
export const wait5Seconds = new Promise(
resolve => window.setTimeout(resolve, 5000)
)
export default () => {
const { resolve, loading } = useAsync({ promise: wait5Seconds })
{ | |
"interview": { | |
"id": "9771aaf8-eafc-4658-b8ab-1b9eecf2f368", | |
"candidate": { | |
"id": "80959d1e-c507-49a2-b965-b3667c7eed48", | |
"firstName": "Fernando", | |
"lastName": "Camargo", | |
"headLine": "Senior Front End", | |
"photo": {} | |
}, |
const LOCAL = { email: "njr@gmail.com", expiredPassword: true }; | |
const DB = { | |
preferences: { optIn: false }, | |
notifications: { duplicated: true, something: true, fake: false }, | |
bills: [1] | |
}; | |
const response = (type, res, params) => | |
console.log(JSON.stringify({ response: { type, res, params } }, null, 2)); |
const URL = 'domain.com/x/y/z' | |
const PARAMS = { | |
firstname: 'firstName', | |
lastname: 'lastName', | |
phone: 'phone', | |
company: 'company', | |
} | |
const concat = ({ |
export const content = [ | |
{ label: 'Item 1' }, | |
{ | |
label: 'Item 2', | |
children: [ | |
{ label: 'Item 2.1' }, | |
{ label: 'Item 2.2' }, | |
{ | |
label: 'Item 2.3', | |
children: [ |
import React from 'react'; | |
import { useForm } from 'hooks'; | |
import settings from './form-settings'; | |
const App = () => { | |
const { | |
components: { Form, Submit }, | |
elements: { |