YouTube: http://youtube.com/@housecor
Consulting: http://reactjsconsulting.com ⚛️
In some cases, TS even uses the exact same syntax as JS for a different purpose.
The difference?
JS features focus on values.
TS features focus on types.
Here's a few examples.
In some cases, TS even uses the exact same syntax as JS for a different purpose.
The difference?
JS features focus on values.
TS features focus on types.
Here's a few examples.
Solution: Use a template literal type.
Full "TypeScript: Deep Dive" course: dometrain.com/course/deep-...
Solution: Use a template literal type.
Full "TypeScript: Deep Dive" course: dometrain.com/course/deep-...
Solution: Use TypeScript's never type.
Here's how:
Full course: dometrain.com/course/deep-...
Solution: Use TypeScript's never type.
Here's how:
Full course: dometrain.com/course/deep-...
Solution: Consider an assertion function.
20% off the full course: dometrain.com/course/deep-...
Solution: Consider an assertion function.
20% off the full course: dometrain.com/course/deep-...
“TypeScript: Deep Dive” explores advanced TS concepts:
- Utility types
- Generics
- Mapped types
- Conditional types
- Template literal types
- Runtime validation
- Decorators
- tsconfig techniques
And over 250+ examples!
Get 20% off at launch here: dometrain.com/course/deep-...
“TypeScript: Deep Dive” explores advanced TS concepts:
- Utility types
- Generics
- Mapped types
- Conditional types
- Template literal types
- Runtime validation
- Decorators
- tsconfig techniques
And over 250+ examples!
Get 20% off at launch here: dometrain.com/course/deep-...
I wanted a count of all the exercise files in my new course.
ChatGPT provided the correct Bash command immediately.
I wanted a count of all the exercise files in my new course.
ChatGPT provided the correct Bash command immediately.
How? It includes expect-type now by default. Handy.
Example:
How? It includes expect-type now by default. Handy.
Example:
Just learned about a new one: Bare.
Bare is unique:
- Light (runs on mobile)
- No server (great for P2P apps)
- Not tied to a specific JS engine.
- Separate modules (Upgrade modules when desired. Install what you need)
More: bare.pears.com
Just learned about a new one: Bare.
Bare is unique:
- Light (runs on mobile)
- No server (great for P2P apps)
- Not tied to a specific JS engine.
- Separate modules (Upgrade modules when desired. Install what you need)
More: bare.pears.com
I disagree. Spelling mistakes slow reading, create confusion, and can lead to bugs.
Solution: Run cspell as part of your CI process.
Here's an example cspell just found - a misspelled style that wasn't applying.
I disagree. Spelling mistakes slow reading, create confusion, and can lead to bugs.
Solution: Run cspell as part of your CI process.
Here's an example cspell just found - a misspelled style that wasn't applying.
They make package.json harder to read, bloat node_modules, waste our time updating packages we don’t use, and create confusion about what our project requires.
Solution: npx depcheck
It lists unused dependencies.
They make package.json harder to read, bloat node_modules, waste our time updating packages we don’t use, and create confusion about what our project requires.
Solution: npx depcheck
It lists unused dependencies.
Solution: Search for @modified.
This displays a list of modified settings.
I used this today because I recently changed a setting that I wanted to revert, and couldn't recall the setting's name.
Solution: Search for @modified.
This displays a list of modified settings.
I used this today because I recently changed a setting that I wanted to revert, and couldn't recall the setting's name.
JSDoc syntax is more verbose, lacks full feature support, and is harder to read.
Look at this comparison. Easy choice.
JSDoc syntax is more verbose, lacks full feature support, and is harder to read.
Look at this comparison. Easy choice.
I'm using an iPad with a Neewer teleprompter as my monitor so I can look directly at the code as I narrate. And Camtasia creates the slick captions.
Thoughts?
I'm using an iPad with a Neewer teleprompter as my monitor so I can look directly at the code as I narrate. And Camtasia creates the slick captions.
Thoughts?
- An interface can extend a type.
- A type alias can "extend" an interface (via a type intersection).
Clip from "TypeScript: Getting Started" on Dometrain: dometrain.com/course/getti...
- An interface can extend a type.
- A type alias can "extend" an interface (via a type intersection).
Clip from "TypeScript: Getting Started" on Dometrain: dometrain.com/course/getti...
The course explores primitive types, arrays, tuples, enums, interfaces, functions, classes, modules, using TS with and without a compiler, features to avoid, and much more.
Publishing this week on Dometrain!
The course explores primitive types, arrays, tuples, enums, interfaces, functions, classes, modules, using TS with and without a compiler, features to avoid, and much more.
Publishing this week on Dometrain!
For years, I used PascalCase for React components. But I now I use kebab-case instead to avoid casing issues.
For years, I used PascalCase for React components. But I now I use kebab-case instead to avoid casing issues.
Now I ask ChatGPT.
It summarizes complex decisions quickly and lays out the information in a helpful manner.
For example, I am considering a GUID primary key. ChatGPT summarizes the tradeoffs nicely.
Now I ask ChatGPT.
It summarizes complex decisions quickly and lays out the information in a helpful manner.
For example, I am considering a GUID primary key. ChatGPT summarizes the tradeoffs nicely.
In Next.js, you decompose via files.
In React Router 7, you decompose via functions.
Which do you prefer, and why?
In Next.js, you decompose via files.
In React Router 7, you decompose via functions.
Which do you prefer, and why?
Suspense siblings prerender!
When a component suspends, React commits the fallback of the nearest Suspense boundary without waiting for the sibling tree to render. Then it schedules another render for the siblings.
Details: github.com/facebook/rea...
Suspense siblings prerender!
When a component suspends, React commits the fallback of the nearest Suspense boundary without waiting for the sibling tree to render. Then it schedules another render for the siblings.
Details: github.com/facebook/rea...
Solution: Force an error via search params.
This hook throws an error when a "throwError" search param is present. I use this to test my ErrorBoundaries in my automated tests too.
Solution: Force an error via search params.
This hook throws an error when a "throwError" search param is present. I use this to test my ErrorBoundaries in my automated tests too.
I talk with @kettanaito.com about best practices for writing mocks including mocking mistakes, finding mocking boundaries, mock data, distinctions between different types of testing, and much more.
I talk with @kettanaito.com about best practices for writing mocks including mocking mistakes, finding mocking boundaries, mock data, distinctions between different types of testing, and much more.
But, it's broader than that. It's an *async state* library.
Example: Here's a custom React Query hook for checking if a device's camera or audio input is available.
But, it's broader than that. It's an *async state* library.
Example: Here's a custom React Query hook for checking if a device's camera or audio input is available.
- Closed blinds (to control the light)
- New 5600K keylight & backlight
- Camera white balance at 5600K
- New camera angle (hides door)
- Recording in 4K/24p at 1/50
- Cleaner background
- Added accent lights
- Brushed my hair
Thoughts? Suggestions?
- Closed blinds (to control the light)
- New 5600K keylight & backlight
- Camera white balance at 5600K
- New camera angle (hides door)
- Recording in 4K/24p at 1/50
- Cleaner background
- Added accent lights
- Brushed my hair
Thoughts? Suggestions?