This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
info: Creating snapshot 0.0.0-11 | |
info: Updating app diablo-app | |
info: Activating snapshot 0.0.0-11 for diablo-app | |
info: Starting app diablo-app | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
warn: Error returned from Nodejitsu | |
error: Error: connect ECONNREFUSED | |
error: at errnoException (net.js:768:11) | |
error: at Object.afterConnect [as oncomplete] (net.js:759:19) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { set, unset, get, PropertyPath } from 'lodash'; | |
import { useSyncExternalStore } from 'react'; | |
export type SimpleReactiveStore = ReturnType<typeof createSimpleReactiveStore>; | |
/** | |
* | |
* @returns a simple store you can use with your react components. | |
*/ | |
export function createSimpleReactiveStore() { | |
const data: object = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SimpleReactiveStore } from './simple-reactive-store'; | |
import React, { useContext, Context, useEffect } from 'react'; | |
type ContextProps<T> = { | |
context: Context<T>; | |
path: string; | |
simpleStore: SimpleReactiveStore; | |
}; | |
export function ContextListener<T>({ context, path, simpleStore }: ContextProps<T>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropsWithChildren, useMemo } from 'react'; | |
import { createSimpleReactiveStore } from './simple-reactive-store'; | |
export type Todo = { | |
id: string; | |
name: string; | |
}; | |
export type TodoAPI = { | |
addTodo: (todo: Todo) => void; |