FIND YOUR NEXT FEW LINES

Results for “TRY_CONVERT”

Small, practical examples. Search by task or narrow things down below.

247 snippets foundClear filters
GitStashing selected work

Apply and remove a successfully restored stash

Git: Pop removes the entry only after a successful application.

Git✓ Tested
ReactGetting Started

Assign a CSS class in JSX

Assign a CSS class in JSX with a small React component and explicit browser behavior.

React✓ Tested
JavaScriptObject behavior & collections

Build an object from key-value entries

JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Build an object from key-value entries

TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

TypeScript✓ Tested
ReactGetting Started

Calculate a value inside JSX

Calculate a value inside JSX with a small React component and explicit browser behavior.

React✓ Tested
ReactState & reducers

Calculate derived state during rendering

Calculate derived state during rendering with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Cancel an asynchronous operation on unmount

Cancel an asynchronous operation on unmount with a small React component and explicit browser behavior.

React✓ Tested
ReactState & reducers

Centralize state changes in a reducer

Centralize state changes in a reducer with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Choose between two render branches

Choose between two render branches with a small React component and explicit browser behavior.

React✓ Tested
ReactContext & shared state

Choose labels from a language context

Choose labels from a language context with a small React component and explicit browser behavior.

React✓ Tested
ReactEffects & lifecycle

Clean up a subscription when a child unmounts

Clean up a subscription when a child unmounts with a small React component and explicit browser behavior.

React✓ Tested
ReactForms & validation

Collect selected options from a multi-select

Collect selected options from a multi-select with a small React component and explicit browser behavior.

React✓ Tested