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
{"lastUpload":"2021-05-24T17:15:16.776Z","extensionVersion":"v3.4.3"} |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"albumId": 1, | |
"id": 1, | |
"title": "accusamus beatae ad facilis cum similique qui sunt", | |
"url": "https://via.placeholder.com/600/92c952", | |
"thumbnailUrl": "https://via.placeholder.com/150/92c952" | |
}, | |
{ |
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
const autoSaveMachine = Machine({ | |
id: 'autosave', | |
initial: 'idle', | |
context: { | |
value: null, | |
revId: 0, | |
errorRetryLevels: [10, 30, 300], | |
errorRetryLevelIdx: 0, | |
errorCounter: 0 | |
}, |
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
const autocompleteMachine = Machine({ | |
id: "autocomplete", | |
type: "parallel", | |
context: { | |
hits: [], | |
highlightedIndex: null | |
}, | |
states: { | |
searchBox: { |
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
const debounce = (func, delay) => { | |
let debounceTimer; | |
return function() { | |
const context = this; | |
const args = arguments; | |
clearTimeout(debounceTimer); | |
debounceTimer = setTimeout(() => func.apply(context, args), delay); | |
}; | |
}; | |
let summery = { addded: [], removed: [] }; |
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 { useInterpret, useService, useSelector } from '@xstate/react' | |
const MyMachineService = React.createContext() | |
const useMyMachineService = () => { | |
const service = React.useContext(MyMachineService) | |
if (!service) { | |
throw new Error(`useMyMachineService() must be used in a child of <MyMachineProvider>`) | |
} | |
return service | |
} |
OlderNewer