Browser JavaScript and Node overlap:
- Browser JavaScript
- window
- document
- localStorage
- Node
- fs
- path
- http
- Both
Browser JavaScript and Node overlap:
const PLAID_KEYS = ["CLIENT_ID", "PUBLIC_KEY", "SECRET_KEY"] as const; | |
const PREFIX = 'PLAID_' | |
const POST_FIX = | |
process.env.NODE_ENV === "development" | |
? "_DEV" | |
: process.env.NODE_ENV === "production" | |
? "" | |
: "_TEST"; |
For taking our Core Workshop, attendees should:
core-v2
course, so run scripts relevant to that when prompted (See [*Running the Course and Lesson Matclass Base { | |
static booted() { | |
console.log(false); | |
} | |
constructor() { | |
// This is a valid way to call a static method | |
// from a non-static method AFAICT. | |
// Anyone know why TS can't infer more from | |
// from the type of this.constructor? |
const Nobr = React.forwardRef((props, ref) => ( | |
<span ref={ref} {...props} style={{ whiteSpace: 'nowrap', ...props.style }} /> | |
)); |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
const { state, send } = useStateMachine({ | |
id: 'presence', | |
initial: present ? 'mounted' : 'unmounted', | |
states: { | |
mounted: { | |
on: { | |
UNMOUNT: 'unmounted', | |
ANIMATION_OUT: 'unmountSuspended', | |
TRANSITION_OUT: 'unmountSuspended', | |
}, |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
/** | |
* @typedef {Object} ClassifyProps | |
* @property {React.ElementType} [as] - Element to render | |
* @property {import('clsx').ClassValue} [className] - Composable classnames passed to clsx | |
*/ | |
/** | |
* @param {ClassifyProps} props | |
*/ | |
function Classify({ as: El = "div", ...props }) { |