Skip to main content

Formatted text & code

Use inline code, bold, italic, and other formatting within table cells.

Inline code in cells

JavaScript methods
MethodSyntaxReturnsDescription
Array.map()array.map(callback)ArrayCreates new array with results of calling function on every element
Array.filter()array.filter(callback)ArrayCreates new array with elements that pass the test
Array.reduce()array.reduce(callback, initial)anyReduces array to single value
String.split()string.split(separator)ArraySplits string into array of substrings

MDX source

<ListTable headerRows={1} caption="JavaScript methods" validation="strict">
- - Method
- Syntax
- Returns
- Description
- - Array.map()
- `array.map(callback)`
- `Array`
- Creates new array with results of calling function on every element
- - Array.filter()
- `array.filter(callback)`
- `Array`
- Creates new array with elements that pass the test
- - Array.reduce()
- `array.reduce(callback, initial)`
- `any`
- Reduces array to single value
- - String.split()
- `string.split(separator)`
- `Array`
- Splits string into array of substrings
</ListTable>

Code samples in cells

React hooks
HookExample UsagePurpose
useState
const [count, setCount] =
useState(0);
Manage component state
useEffect
useEffect(() => {
// side effect
}, [deps]);
Handle side effects
useCallback
const fn = useCallback(
() => {...}, [deps]
);
Memoize functions
useMemo
const value = useMemo(
() => compute(), [deps]
)
Memoize values

MDX source

<ListTable headerRows={1} caption="React hooks" validation="strict">
- - Hook
- Example Usage
- Purpose
- - `useState`
- ```jsx
const [count, setCount] =
useState(0);
```
- Manage component state
- - `useEffect`
- ```jsx
useEffect(() => {
// side effect
}, [deps]);
```
- Handle side effects
...
</ListTable>

Mixed formatting

Git commands
CommandDescriptionExample
git commitSave changes to local repository
Creates a snapshot of staged changes
git commit -m "Add feature"
git pushUpload local commits to remote
Updates remote branch
git push origin main
git pullDownload and merge remote changes
Combination of fetch + merge
git pull origin main
git rebaseReapply commits on top of another base
⚠️ Rewrites history
git rebase main

MDX source

<ListTable headerRows={1} caption="Git commands" validation="strict">
- - Command
- Description
- Example
- - `git commit`
- **Save changes** to local repository\
_Creates a snapshot of staged changes_
- `git commit -m "Add feature"`
...
- - `git rebase`
- **Reapply commits** on top of another base\
_⚠️ Rewrites history_
- `git rebase main`
</ListTable>
Documentation resources
TechnologyOfficial DocsCommunity
Reactreact.devr/reactjs
TypeScripttypescriptlang.orgTS Community Discord
MDXmdxjs.comGitHub Discussions
Docusaurusdocusaurus.ioDiscord Server

MDX source

<ListTable headerRows={1} caption="Documentation resources">
- - Technology
- Official Docs
- Community
- - React
- [react.dev](https://react.dev)
- [r/reactjs](https://reddit.com/r/reactjs)
- - TypeScript
- [typescriptlang.org](https://www.typescriptlang.org)
- [TS Community Discord](https://discord.gg/typescript)
...
</ListTable>