YouTube: http://youtube.com/@housecor
Consulting: http://reactjsconsulting.com ⚛️
2014: Class state
2016: Redux
2018: useState, useReducer, useContext
2020: React query
2021: Zustand for globals
2024: useOptimistic, useTransition, useFormStatus, useActionState, RSC
2025: Tanstack DB or sync engine (Zero, Electric, Convex)
2014: Class state
2016: Redux
2018: useState, useReducer, useContext
2020: React query
2021: Zustand for globals
2024: useOptimistic, useTransition, useFormStatus, useActionState, RSC
2025: Tanstack DB or sync engine (Zero, Electric, Convex)
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.
I’ve been heads down for 3 months creating my most ambitious course yet:
“TypeScript: Deep Dive”
Just recorded the final clip. This course is 7 hours of advanced features, tips, patterns, and tricks to level up your TS skills.
Publishing this week on Dometrain!
I’ve been heads down for 3 months creating my most ambitious course yet:
“TypeScript: Deep Dive”
Just recorded the final clip. This course is 7 hours of advanced features, tips, patterns, and tricks to level up your TS skills.
Publishing this week on Dometrain!
1. Start strict, and loosen in spots as needed.
2. Start loose, and migrate to stricter rules over time.
I prefer 1. It's safer.
Default strict. Loosen when necessary.
1. Start strict, and loosen in spots as needed.
2. Start loose, and migrate to stricter rules over time.
I prefer 1. It's safer.
Default strict. Loosen when necessary.
How? It includes expect-type now by default. Handy.
Example:
How? It includes expect-type now by default. Handy.
Example:
It seems fine at first, but at some point you need to understand how to code.
It seems fine at first, but at some point you need to understand how to code.
Solution: Instead of coding against these APIs directly, wrap access in an interface.
Solution: Instead of coding against these APIs directly, wrap access in an interface.
When I correct an LLM it “forgets” and makes the mistake again later.
Solution:
1. Create a llm-learning file.
2. Tell the LLM to write to that file each time I correct it. (I use copilot-instruction.md to instruct Copilot)
Now it “learns” over time!
When I correct an LLM it “forgets” and makes the mistake again later.
Solution:
1. Create a llm-learning file.
2. Tell the LLM to write to that file each time I correct it. (I use copilot-instruction.md to instruct Copilot)
Now it “learns” over time!
-Cookies
-Local storage
-URL params
-API responses
-Form values
-Environment variables
I use Zod to validate runtime inputs. So, I don’t need to worry if the input is malformed.
I show how I work with Zod in detail in TypeScript: Deep Dive”.
Publishing in May!
-Cookies
-Local storage
-URL params
-API responses
-Form values
-Environment variables
I use Zod to validate runtime inputs. So, I don’t need to worry if the input is malformed.
I show how I work with Zod in detail in TypeScript: Deep Dive”.
Publishing in May!
Reality: "To go deeper, teach."
For example, I've worked successfully in TypeScript for years. But now that I'm writing a deep dive course, I'm finding edge cases that I hadn't naturally explored as a practitioner.
Teaching forces me to grow.
Reality: "To go deeper, teach."
For example, I've worked successfully in TypeScript for years. But now that I'm writing a deep dive course, I'm finding edge cases that I hadn't naturally explored as a practitioner.
Teaching forces me to grow.
return fieldErrors as { [key: string]: { errors: string[] } }
Type assertions are NOT safe.
It's saying "Trust me TypeScript, it's fine."
Instead, validate. Consider Zod, ArkType, etc.
return fieldErrors as { [key: string]: { errors: string[] } }
Type assertions are NOT safe.
It's saying "Trust me TypeScript, it's fine."
Instead, validate. Consider Zod, ArkType, etc.
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'm presenting "Creating Automated Tests with AI" April 23 at 11AM ET.
In this webinar I'll show how to quickly generate tests using ChatGPT, Copilot, and Applitools Autonomous.
Sign up: applitools.info/8y6
I'm presenting "Creating Automated Tests with AI" April 23 at 11AM ET.
In this webinar I'll show how to quickly generate tests using ChatGPT, Copilot, and Applitools Autonomous.
Sign up: applitools.info/8y6
There are 100's of handy 3rd-party utility types too.
Here are the top 4 I found while researching "TypeScript: Deep Dive" (publishing soon).
github.com/millsp/ts-to...
github.com/piotrwitek/u...
github.com/andnp/Simply...
github.com/sindresorhus...
There are 100's of handy 3rd-party utility types too.
Here are the top 4 I found while researching "TypeScript: Deep Dive" (publishing soon).
github.com/millsp/ts-to...
github.com/piotrwitek/u...
github.com/andnp/Simply...
github.com/sindresorhus...
I'm not saying they're perfect, but this short comparison shows why I still think they're compelling.
youtu.be/LdFPUzkaiCA
I'm not saying they're perfect, but this short comparison shows why I still think they're compelling.
youtu.be/LdFPUzkaiCA
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.
.catch((e) => console.log(e))
It's error swallowing.
The user isn’t watching the console.
Solution: Show the user a friendly non-technical message like "Sorry, an error occurred. Please try again later."
.catch((e) => console.log(e))
It's error swallowing.
The user isn’t watching the console.
Solution: Show the user a friendly non-technical message like "Sorry, an error occurred. Please try again later."
Here are 7 reasons I use TypeScript instead of JavaScript.
youtube.com/shorts/fQaC0...
Here are 7 reasons I use TypeScript instead of JavaScript.
youtube.com/shorts/fQaC0...
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.