This file contains 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 {getGistMock} from "./mocks/gist.mock"; | |
import {getLinkHeaderMock} from "./mocks/link-header.mock"; | |
import {getLinkHeaderStringMock} from "./mocks/link-header-string.mock"; | |
import {getGistsUrlMock} from "./mocks/gists-url.mock"; | |
import {getProcessedGistMock} from "./mocks/processed-gist.mock"; | |
import { | |
getDescription, | |
getGistsFactory, | |
getNextUrlFactory, | |
handleGistsRouteFactory, |
This file contains 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 MVCComponent = () => { | |
const [model, dispatch] = useReducer(reducer, initialModel); | |
const handleEvent = () => { | |
dispatch(action); | |
}; | |
return <View model={model} handleEvent={handleEvent} />; | |
}; |
This file contains 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 withValidation = (state, field, value) => { | |
const changedState = { | |
...state, | |
fields: { | |
...state.fields, | |
[field]: { | |
...state.fields[field], | |
value, | |
}, | |
}, |
This file contains 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
let counter = 0; | |
const count = () => { | |
counter += 1; | |
} |
NewerOlder