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
/Users/me/.cache/mill/download/0.8.0: line 19: /Users/me/Library/Caches/Coursier/arc/https/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11%252B28/OpenJDK11-jdk_x64_mac_hotspot_11_28.tar.gz/jdk-11+28/Contents/Home/bin/java: No such file or directory | |
/Users/me/.cache/mill/download/0.8.0: line 19: exec: /Users/me/Library/Caches/Coursier/arc/https/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11%252B28/OpenJDK11-jdk_x64_mac_hotspot_11_28.tar.gz/jdk-11+28/Contents/Home/bin/java: cannot execute: No such file or directory |
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
function isAuthenticated() { | |
return Promise.resolve(true); | |
} | |
const appMachine = Machine({ | |
id: 'app', | |
initial: 'idle', | |
context: { | |
retries: 0 | |
}, |
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
function fetchQuestions() { | |
return Promise.resolve([ | |
{ name: 'bob' }, | |
{ name: 'bill' }, | |
{ name: 'mary' } | |
]); | |
} | |
const test = Machine({ |
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 AddTodo: React.FC = (): React.ReactElement => { | |
const [userInput, setUserInput] = React.useState(""); | |
const dispatch = useDispatch(); | |
const handleAddTodo = (e: React.ChangeEvent<HTMLInputElement>) => { | |
if (e.key === "Enter") { // Property 'key' does not exist on type 'ChangeEvent<HTMLInputElement>'.ts(2339) | |
dispatch(add({ id: uuidv4(), task: "bob" })); | |
} | |
}; | |
return ( |
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
// doesn't work | |
import { createSlice, PayloadAction } from "@reduxjs/toolkit"; | |
const todo = createSlice({ | |
name: "todo", | |
initialState: [], | |
reducers: { | |
add: (state, action: PayloadAction<string>) => { | |
state.push(action.payload); // Argument of type 'string' is not assignable to parameter of type 'never'.ts(2345) | |
} |
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
// here is your normal component. at the moment, it doesn't do anything really. | |
class App extends React.Component { | |
render() { | |
return ( | |
<div className="App"> | |
<h1>Counter: {counter}</h1> | |
<button onClick={() => {}}>+</button> | |
<button onClick={() => {}}>-</button> | |
</div> |
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
{ | |
"name": "server", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "nodemon src/app.js" | |
}, | |
"keywords": [], | |
"author": "", |
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 foo = () => { | |
return ( | |
<div> | |
<div>foobar</div> | |
</div> | |
) | |
} | |
const foo = () => { | |
return ( |
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
class App extends React.Component { | |
constructor(...props) { | |
super(...props); | |
} | |
render() { | |
const { match, history } = this.props; | |
return ( | |
<Route | |
exact |
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 pickList; | |
setTimeout(async () => { | |
const foo = await apiCallWrapper(store, getParcelPickListItems, parcel.id); | |
pickList = foo[0]; | |
}, 5000); |
NewerOlder