FIND YOUR NEXT FEW LINES

Results for “component”

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

277 snippets foundClear filters
JavaEncoding & structured values

Inspect components of a URI

Java: Use URI parsing instead of splitting a URL at punctuation manually.

Java✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactGetting Started

Keep component state with useState

Keep component state with useState with a small React component and explicit browser behavior.

React✓ Tested
ReactPerformance & rendering

Memoize a component with stable props

Memoize a component with stable props with a small React component and explicit browser behavior.

React✓ Tested
ReactGetting Started

Nest a reusable component

Nest a reusable component with a small React component and explicit browser behavior.

React✓ Tested
JavaFile operations & binary data

Normalize relative path components

Java: Path.normalize removes redundant dot components without accessing the filesystem.

Java✓ Tested
C#Dates & precise numbers

Parse a date without a time component

C#: DateOnly avoids attaching an irrelevant time or timezone to a calendar date.

C#✓ Tested
JavaScriptRegular expressions & URL encoding

Percent-encode one URL component

JavaScript: encodeURIComponent escapes a parameter value rather than a complete URL.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Percent-encode one URL component

TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.

TypeScript✓ Tested
AngularGetting Started

Project content into a reusable component

Project content into a reusable component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
JavaScriptUTC date operations

Read date components in UTC

JavaScript: UTC accessors avoid differences caused by the machine’s local timezone.

JavaScript✓ Tested
TypeScriptUTC date operations

Read date components in UTC

TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.

TypeScript✓ Tested