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
| // check version | |
| node -v || node --version | |
| // list installed versions of node (via nvm) | |
| nvm ls | |
| // list available versions of node (via nvm) | |
| nvm ls-remote | |
| // install specific version of node |
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 { useState } from 'react'; | |
| export function useCounter(initial = 0) { | |
| const [count, setCount] = useState(initial); | |
| return [count, () => setCount(count + 1)]; | |
| } |