
Explore how JavaScript's dynamic typing can lead to runtime errors and how TypeScript adds static typing to catch bugs at build time, since it is a superset of JavaScript.
Explore TypeScript project starting points via TypeScript lang org docs. Test code with the TypeScript playground, and access the GitHub course repository.
Explore bootstrapping a TypeScript project with a pre-built vite template, choosing vanilla TS or React templates, via npm create vite@latest. Focus on writing TypeScript logic, not configuration.
Discover how to organize a practical TypeScript project by structuring public and source folders, installing dependencies, and running a dev server at localhost:5173, with a ts file import into main.ts.
Watch the build step transpile TypeScript into vanilla JavaScript to create a production ready application in the dist folder, while the demo shows an interface example and the emitted index.js.
Master type annotations in TypeScript by declaring variable types with a colon, exploring string, number, and boolean, and seeing how static typing prevents type errors and unintended bugs.
Explore how TypeScript infers types from values to reduce explicit annotations, while noting when to use annotations and watch out for gotchas with complex values.
Practice with types by creating a string, a number, and a boolean, applying methods and math operations, and observing TypeScript errors when assigning mismatched types using annotations or inference.
Run the project locally despite TypeScript errors, then build to pass TypeScript checks and generate a production ready dist folder.
Explore how union types let a variable hold number or string values, with literal value types and the pipe operator guiding type checks in TypeScript.
Explore the any type in TypeScript, learning how it bypasses type checking, its risks of spreading through an application, and practical use cases like testing or gradually introducing TS.
Explore practical type annotation in TypeScript by typing a books list and a potentially undefined variable, using union types and optional chaining to avoid runtime errors.
Apply union and literal types to model order status and discounts in TypeScript, using number or string for discount and constrained values like processing, shipped, delivered.
Learn how to type arrays in TypeScript by declaring number and string arrays, enforcing types with square brackets, exploring type inference, and using unions to mix string and boolean values.
Create typed arrays in TypeScript: a temperatures array of numbers, a colors array of strings, and a mixed array of numbers or strings, then explore push errors from mismatched types.
Create and type objects in TypeScript by building a car with brand and year, demonstrating type annotations, optional properties, read-only fields, and arrays of objects.
Practice creating TypeScript objects like bikes and laptops, annotate types for brand and year, and manage an array of products with optional price properties and type checks.
Explore functions in TypeScript with parameters, enforce explicit type annotations (string) to avoid implicit any, and understand compile-time errors when passing incorrect types or extra arguments.
Create a calculateDiscount function that takes a price as a number and returns price times 0.9. Apply TypeScript return-type annotations to catch errors, returning a string instead of a number.
Explore why using any in TypeScript is risky, showing a function with a number parameter set to any, causing results to become any and trigger runtime errors.
Practice practical TypeScript by building an array of names and a function that checks membership with includes, returning a boolean, and testing with sample names via console logs.
Explore optional and default parameters in TypeScript by building a calculate function that handles price and discount, and provide a fallback when discount is undefined using the or operator.
Explains default parameters in TypeScript by building a calculate score function with initial score and default penalty points, returning initial score minus penalties and contrasting optional vs default parameters.
Explore rest parameters in TypeScript, collecting an arbitrary number of arguments into a numbers array and summing them with reduce. See how TypeScript infers types with map and callbacks.
Explore void as a function return type by logging a message, seeing how TypeScript infers void, and how declaring void prevents returning values later.
Implement a process input function that accepts a string or number, multiplies numbers and logs results, or logs string input uppercase, using type guards with typeof to distinguish types.
Learn how to use objects as function parameters in TypeScript, with explicit type annotations, destructuring, and returning objects with id and is active, plus alternative approaches.
Understand the excess property check in TypeScript by contrast between inline object literals and object references, noting that extra properties error inline but may be allowed on typed objects.
Learn to build a process data function in practical TypeScript that accepts a string or number and a config object; numbers are squared, strings become uppercase, and optionally reversed.
Discover how TypeScript type alias creates a named shortcut for an existing object shape, reducing repetition, improving readability, and enabling reuse across files via export and import.
Explore how type aliases extend beyond objects to unions like string or number and literal themes such as light or dark, and apply them in variables and functions.
Define type aliases for employee and manager, use an array of employees, and apply a type guard to distinguish managers from employees, printing staff details.
Apply intersection types to merge a book type with a discount field, enabling all properties together and preventing type errors, unlike unions which separate types.
Practical TypeScript explains how type aliases can use computed properties to dynamically reference object keys, demonstrated with a tiger object and a prop name variable.
Explore how interface types describe an object's shape in TypeScript and compare them with type aliases, then build a book object with a readonly id and an optional genre.
Explore methods in interfaces by defining method blueprints (name, parameters, return type), implement them with or without parameters, log results, and understand this and arrow syntax options.
Explore alternative interface method patterns in TypeScript by turning methods into properties assigned to functions, including function keyword and arrow function variants, with notes on this binding and TypeScript behavior.
Define a TypeScript interface for a computer with a read only id, brand, ram, and an upgradeRam method that returns a number, then instantiate and upgrade ram.
Learn how to merge and extend interfaces in TypeScript by combining person and dog owner with additional properties, using interface reopening, extends, and type guards to build richer objects.
Practical typescript: learn to define person, dog owner, and manager interfaces and return one via a union-typed get employee function, then apply type guards to distinguish them.
Discover how to implement an isManager type predicate in practical TypeScript to narrow an object to a manager and safely invoke delegate tasks.
Explore the differences between interface and type alias in practical TypeScript, including shape of objects, merging interfaces, primitive and literal types, class implementation, and computed properties.
Master TypeScript tuples, fixed-length, fixed-type arrays that group string and number values, like [string, number] for a person and [number, number, number] for a date, with readonly and optional parameters.
Explore enums in TypeScript to define named constants, apply an enum-typed interface, and return a server response with success or error status.
Numeric enums in TypeScript create reverse mapping, exposing both numbers and names when iterating values; use a type guard to access only numbers, since string enums lack reverse mapping.
Define type alias named user and enum with admin, manager, and employee. Implement a createUser function that returns a user and instantiate with id, name, role, and a contact tuple.
Explore type assertion in TypeScript to tell the compiler a value's type, using as to assert strings, Json parse results, and enum-like status handling, including practical DOM and data scenarios.
Apply type unknown as a type safe counterpart to type any, enforcing type checks before use to avoid runtime errors in try catch scenarios.
Master the TypeScript never type, representing values that never occur, and use exhaustive enum checks at build time to prevent runtime issues.
Understand how TypeScript treats files as scripts by default, risking global name collisions, and learn to create ES6-style modules by using export/import or forcing module detection in tsconfig.
Explore how ES6 modules work in TypeScript, including configuring the tsconfig module setting, exporting functions, values, and types, and importing them across files to manage module syntax.
Learn how TypeScript treats JavaScript files and why using .ts files helps the compiler know data shapes, while enabling allowJs can let JS files work but with limited type inference.
Explore type guard options in TypeScript using typeof to narrow string, number, and boolean types. Build a checkValue function that applies type guards and demonstrates runtime checks with starter code.
Explore equality narrowing in practical TypeScript by using type property checks and the in operator to distinguish a dog from a cat, enabling bark or meow calls.
Explore truthy and falsy guards in TypeScript by building a print length function that handles string, null, or undefined, logging the string length or a no string provided message.
Apply instanceof type guards in TypeScript to determine an object's class at runtime, handle unknown errors via try-catch, and differentiate dates from strings.
Explore type predicate functions that narrow a union type (student or user) and decide between study and login methods using the in operator or type assertion in TypeScript.
Uncover the type never gotcha in TypeScript by hardcoding a person as either a student or a user, and observe how type predicates drive else blocks.
Explore discriminated unions in TypeScript by modeling increment and decrement actions, build a reducer that uses a switch on action.type, and implement an exhaustive default with the never type.
Explore generics in TypeScript by showing how arrays use a single generic type to work with any element type, while preserving array methods.
Explore generics by building a generic function that accepts and returns any type using a type parameter T, and apply the same concept to a generic interface.
Explore how async functions return promises and how TypeScript generics specify the promise's contained type, using examples with string and number to build foundation for documentation.
Explore a generic create array function in TypeScript that builds a length-specified array from a value, showcasing strings, numbers, and a type parameter T.
Explore generics with multiple types in TypeScript by building a pair function that accepts two parameters of different types and returns them in a typed array, preserving types.
Discover how TypeScript infers generics without explicit type parameters and when to use extends to constrain types. See useState and React examples, union types, and safe value handling.
Explore how to constrain generics with extends using custom types that have a name property, and learn to narrow by defining a property-based constraint instead of relying on unions.
Set a default type in generics by using a generic store data interface with a data array, and observe axios defaulting to any when no type is provided.
Learn how to fetch data with the TypeScript fetch API, log results, handle errors with response.ok and status, and prepare for typing the tours data.
Define a typed fetch workflow in TypeScript by creating a tour type with id, name, info, image, and price, and return a Tour[] from fetch data to enable autocompletion.
Learn how TypeScript's compile-time typing can diverge from runtime results and use Zod to perform runtime validation, ensuring data matches the expected shape when fetching data.
Learn how to validate data at runtime using the Zod library, install and import Zod, build a string-based tour schema, infer types, and use safe parse to ensure data integrity.
Explore TypeScript declaration files and how type definitions for the dom and libraries enable safe coding. Learn how to locate, install, and use types for libraries like zod and bcryptjs.
Configure the tsconfig to control TypeScript projects, focusing on include, compilerOptions, target, module, lib, and strict settings, with examples like no unused locals.
Explore TypeScript class syntax with a book example, using a constructor and this to set title and author, while adding type annotations to fix red squiggles.
Define default properties inside a TypeScript class to auto-apply to all instances; learn boolean defaults, type inference, and common pitfalls.
Understand how the readonly modifier on class properties prevents modification while enabling reads in practical TypeScript. See how the title property example shows you can read it but not assign.
Learn how public, private, and read-only modifiers control access to class properties in TypeScript, then implement accessors and a toggle status method to manage visibility.
Explore the constructor parameter properties shortcut in TypeScript, using read only, public, or private modifiers to auto-assign class members, reducing boilerplate and enabling instant access to author and title.
Explore getters and setters in TypeScript, using get and set to create computed properties, combine private and public modifiers, and manage value checks with console logging.
Implement the interface with a class by defining public name: string, and public age: number, and a greet method, then instantiate and call greet to confirm behavior.
Set up a small tasks project by creating tasks.html, a TypeScript file, and a separate tasks.css; connect a form, input, and add task button to a dynamic list using JavaScript.
Explore how query selector returns a general element and may be null, prompting optional chaining or the non-null assertion, and how to narrow to html button element for button-specific properties.
Select the form, input, and list to capture input on submit and add tasks to the list. Define the task shape with TypeScript types and prepare for local storage.
Set up a task form submit handler with TypeScript, prevent default, capture task description, validate input, render tasks, update local storage, and reset the form.
Learn how TypeScript types a submit event in a tasks project, comparing callback handling to using a function reference. Explicitly typing the event ensures correct behavior in React.
define a typed task, implement addTask to push new tasks into the list, render tasks, and update local storage, enabling a functional task management flow in TypeScript.
Render the task on screen by creating a list element, setting its text content to the task description, and appending it to the task list; load tasks from local storage.
Implement local storage for the tasks project by updating storage with JSON.stringify and localStorage.setItem on changes. Load and render tasks from localStorage by using getItem and JSON.parse on page load.
Add a checkbox to each list item and toggle its is completed state when the checkbox changes, defaulting to false, then update storage to persist the task status across refreshes.
Explore using TypeScript with React, building on fundamentals like components, state, and hooks, and set up the starter project with npm install and npm run dev to run at localhost:5173.
Explore the React TypeScript project structure, including node_modules, public and src folders, assets, configuration files, and the concept of topic-based index tsx components for progressive lessons.
React components are functions, and TypeScript infers their return as a JSX element, guiding implicit returns or explicit JSX, string, or null.
Define and type React props inline in a TypeScript project, with name as string and id as number, then use them in headings and have TypeScript flag missing props.
Explore using type alias or interface for component props, and decide between destructuring or referencing props directly. Learn how to keep TypeScript happy and follow personal preference.
Learn how the special children prop enables passing elements into components, type it as react node or via props with children, and make it optional to avoid type errors.
Master use state in React with TypeScript by leveraging type inference and generics, handling string, number, and array states, and explicitly typing empty arrays for safe updates.
Build a nav links list in TypeScript, define a link type with id, url, and text, and use useState to explore type inference and safe updates.
Explore handling events in React by building controlled inputs (text and email), wiring them to state and onChange handlers, and using TypeScript to infer primitives and type events with React.ChangeEvent<HTMLInputElement>.
Demonstrates handling form submissions in react with the form data API, using name attributes and TypeScript typing for FormEvent<HTMLFormElement>, currentTarget, and form data access.
Create a component that switches props by type: basic requires a name, advanced requires name and email, and render two instances to show differing looks.
Explore a React and TypeScript challenge, implement a profile card with types and props, and see why basic vs advanced typing and optional email matter for a proper TypeScript solution.
Analyze why adding email and type checks with a ternary for advanced versus basic types fails to fix the issue, highlighting empty strings in optional properties in app tsx cards.
Build a two-type solution for a profile card by defining basic and advanced props, uniting them into a union, and rendering name and optional email with type-based styling.
Learn how to implement the TypeScript context API with a basic provider, useContext hook, and a theme example across two files, including typing, defaults, and error handling.
Build a theme context using the context API and TypeScript, with a theme provider and useState to toggle between light, dark, and system themes via a button.
Learn to use the useReducer hook with TypeScript to manage a counter and status, set up initial state and a counter reducer with increment, decrement, and reset.
Use useReducer to manage a counter with increment, decrement, and reset actions, typed with TypeScript and dispatched to a reducer that updates state through a switch, with three buttons.
Learn to handle status with useReducer in TypeScript by dispatching set status actions with active or inactive payloads, update state, and catch unhandled actions at build time.
Fetch data in React with TypeScript using useEffect and the Fetch API, compare with React Query and Axios, and manage loading and error states while retrieving tours.
Define a tour schema with Zod, infer a TypeScript type, and validate fetched data at runtime, then render tours with React useEffect and fetch, handling errors.
Fetch data with Axios and React Query to return a typed array of doors or tours, using useQuery and a query client provider for streamlined, type-inferred data handling.
Discover redux toolkit setup for a global state in TypeScript and create a counter slice with initial state and reducers for increment, decrement, reset, and set status.
Set up a Redux Toolkit boilerplate by creating store.ts and hooks.ts, configuring the store with the counter reducer, and typing RootState and AppDispatch for typed useDispatch and useSelector in main.tsx.
Use Redux Toolkit with useAppSelector and useAppDispatch to interact with the counter slice, read count and status, and dispatch increment, decrement, reset, and setStatus.
build a tasks app in typescript by creating a form and a list, define a Task type with id, description, and is completed, and manage adding and toggling with state.
Set up a controlled form with useState, handle submit by preventing default, validate text, alert on empty input, add tasks to the list, and reset the input.
Create an add task function that spreads existing tasks and appends the new one, with a form that accepts task props and enforces type checks.
Build a TypeScript task list with a checkbox to toggle isCompleted, map over tasks to update state, and pass tasks and a toggle function as list props.
Add local storage to the React TypeScript task app using useEffect to load and update tasks via JSON.stringify and JSON.parse.
Jump into building a modern e-commerce app with practical TypeScript, starting with Tailwind CSS, Shazza UI, and Redux Toolkit, then organizing the app’s pages.
Bootstrap a fresh react with typescript project using npm create v8 and the provided readme. Install dependencies, run the dev server on localhost:5173, and override boilerplate if needed.
remove boilerplate code and set up TypeScript React project with a minimal component using ES7 snippets, and install Redux Toolkit, React Redux, Axios, React Router DOM, Tailwind, and Chassis UI.
Explore Tailwind CSS and Shazza UI components as industry-standard styling for Practical TypeScript, with an optional Tailwind overview and steps to install Tailwind.
Master Tailwind CSS basics by applying utility classes directly in JSX. Grasp color shades, spacing, width, hover, flex, and grid, and the mobile-first approach with quick docs for lookups.
Install Tailwind CSS with PostCSS and Autoprefixer as dev dependencies, configure Tailwind.config, add Tailwind directives to index.css, and test by rendering a heading with Tailwind classes.
Install and configure shadcn/ui with tailwind in a TypeScript project, modify tsconfig, run the initial setup, and render a button in app.tsx to demonstrate TypeScript autocompletion and UI components.
Explore how shadcn/ui accelerates development with a library of reusable, accessible components powered by tailwind and TypeScript, enabling fast, customizable UI with minimal CSS.
Install Redux Toolkit and React Redux, create feature folders with cart, user, and theme slices, configure the store with reducers, and set up hooks and provider to test state access.
Create a pages folder, build page components from about to single product, set up an index.ts to export them, and import into app.tsx to wire up navigation with react router.
Install React Router DOM and configure a browser router with routes for home and cart, using path and element mappings in a TypeScript project.
Explore front-end navigation with the React Router DOM link component, using the to prop and the as child pattern to create link-styled buttons that navigate without server requests.
Learn how to share a common layout across pages using React Router's outlet component, with a parent home layout, child routes, and index to render the landing page.
Build and export a responsive header component in a practical TypeScript project, using links, use state, and navigate to toggle between a greeting with logout and login/register links.
Learn to fix header alignment in tailwind by creating a custom align class with left-right auto margins, a max width, and padding, then apply it to header, navbar, and content.
Set up the navbar component by creating five subcomponents—logo, links, dropdown nav, links mode toggle, and card button—and render them inside the navbar.
Build a logo component with the armchair icon in a react-router-dom link that navigates home, and adapt the nav for small screens using flexbox.
Create a typed links list in TypeScript, export it from a utils module, and reuse it for both the links dropdown and nav links in the app.
Explore building a links dropdown in practical typescript using the Qazi dropdown component, wiring a links list into dropdown menu items with an active class and responsive behavior.
Develop a responsive nav links component that hides on small screens and shows on large screens, iterating over links to render nav items with href, keys, and active-state styling.
Learn to implement a mode toggle and change themes using CSS variables by selecting a theme in the readme, copying the base layer code, and restarting the dev server.
Implement a theme toggle using applyTheme to switch the HTML root between light, dark, and system, updating CSS variables. Use a theme slice and system preference logic.
Set up a theme slice with an initial theme, a set theme reducer using the action payload, apply the theme, update html class, and persist to local storage on load.
Implement a mode toggle using a drop-down theme menu and Redux toolkit, dispatching set theme for light, dark, and system options with icon swaps.
Complete the cart button component to finish the navbar, using button, cart icon, and link imports; hard-code five items and implement an absolute badge linking to the cart page.
Build a custom error page with the use route error hook, handle 404s and other errors, and wire a back home link into the router.
Create an about page component with a heading and centered paragraph of dummy text, using responsive flex layouts, gaps, and bold, wide-tracking typography, plus a styled span.
Implement a reusable error element with a dedicated component using useRootError, added to all pages to prevent layout breaks from fetch errors and 404s.
Begin the landing page by building a hero carousel and featured products, fetch server data for the featured items, and render the hero, section title, and product grid.
Set up a custom Axios fetch instance with a base URL to simplify API calls across the project, enabling calls like /api/products and /api/products/{id} without repeating the full URL.
Define and export modular types for TypeScript product data, modeling the API response with data and meta (categories, companies, pagination) for both all and featured product fetches.
Learn how to fetch data before a route renders using the loader function in React Router, returning data or null to preload content and show skeletons.
Learn to set up a landing page loader in react router, fetch featured products with axios, and access loader data across components using useLoaderData.
Render featured products with a section title and product grid, using use loader data to access products, and integrate a chassis separator while managing unused variables.
Create a formatAsDollars utility that converts prices from cents to dollars for display, uses Intl.NumberFormat with USD, and preserves the API price as string or number for stripe submissions.
Build a responsive products grid in practical TypeScript using Shotzi card components, render each product with image, title, and a formatted price, and create dynamic product links.
Learn to implement a two-column landing page with a hero text block and a chassis carousel, using a responsive grid and a link button to the products page.
Install and configure a pre-made hero carousel, prepare an assets images array, map items into carousel cards via carousel content, and enable previous and next controls with responsive display.
Set up the products page by creating filters, products container, pagination container, and the products list and grid, and implement a loader with a custom fetch to return all products.
Develop a responsive product list component in practical typescript that toggles between grid and list layouts using loader data, displaying image, title, company, and price formatted in US dollars.
Build a products container that shows total products from meta pagination, defaults to the first page with ten items, and toggles between grid and list views, including no results handling.
Set up a global loading state using React Router navigation to show a loading skeleton while prefetching products, wrapping the outlet with a loading check and rendering a loading component.
Learn to implement a loading component using a skeleton from chassis, customizing width and height, and rendering three skeleton cards in a responsive grid until content loads.
Create a functional filters component in TypeScript by wiring inputs, selects, sliders and checkboxes to query params, with reset and seamless navigation.
Explore building dynamic query params in a TypeScript app by reading the request URL, constructing search params, and fetching matching products with Axios while handling resets.
Set a default value for the search, pass optional params through the products page and loader data, and sync query params with the input in filters.
Create a reusable form input component in TypeScript using a label and input with dynamic props, styled for Radix UI, and integrate it across register, login, and checkout forms.
Install and configure the form select component from Qazi, then build a multi-field filter with category, company, and order by options to drive query parameters.
Demonstrate a form range slider to select a price, configuring max, step, and default values, formatting dollars and syncing with query params.
Learn to build a form checkbox in Practical Typescript, wiring a free shipping option to query params and implementing default checked logic.
Install and configure the Schatz pagination component, convert pagination links to React Router links, and preserve existing query params while updating types for reusable inputs across the page.
Set up pagination by building two helper functions that construct url params and prev/next navigation, handling page numbers, search queries, and path name.
Use loader data to obtain meta page count, derive a pages array, render active pagination items, and build prev/next urls with current page, search params, and path name.
Complete a pagination container by constructing URLs that preserve existing query params, add the page value with URLSearchParams, and generate proper prev and next links for products pages.
Explore using React Router URL parameters to render a single product page with a dynamic id, fetch its data, and navigate from product cards.
Create select product color and select product amount components, export them, implement a single product loader to read route params, wire imports in app.tsx, and prepare dynamic single product pages.
Practical TypeScript teaches how to fetch a single product from an API, set up types for the response, and render product attributes like image, title, description, price, and colors.
Demonstrates a two-column product page rendering an image beside product info. It adds navigation links, color and amount selectors, and an add to bag button with a placeholder cart action.
Implement a select product colors component that renders a color button for each color, highlights the active color, and updates the color state with setProductColor.
Build a reusable select product amount component for single product and cart pages, using a mode enum, TypeScript props, and dynamic max logic to manage item counts.
Install the chassis toast component and set up a root toaster to display toasts for cart actions and login or register.
Set up the cart slice with initial state, types, cart items, and local storage integration, then implement actions for adding, removing, editing items and calculating totals.
Implement the add item reducer to update or add cart items using a typed payload, recalculate totals, and persist changes to local storage with a toast.
Learn how the clear cart reducer returns the default state to reset the cart on logout, clearing local storage and resetting quantities including shipping to zero.
Remove an item from the cart by matching the cart id from the action payload, update cart items and total, and trigger a toast.
Implement the edit item reducer in the cart slice, using cart id and amount from the action payload to update the item's amount, then calculate totals and show a toast.
Learn to implement add-to-cart on a single product page by dispatching add item actions, constructing a cart item with product id and color, and syncing with local storage.
Set up a cart page in TypeScript by building cart items, cart totals, and multi-column item layouts, wired to state and user login to enable checkout.
Build a cart totals component in typescript that uses a row subcomponent and useAppSelector to display subtotal, shipping, tax, and order total formatted in dollars, with separators for non-last rows.
Map cart items from state with use app selector, render a card per item, and organize four column components with id, image, title, price, color, and company, with responsive layout.
Set up the first column to render an image from image and title props with string types, including alt text. Use h-24 w-24 rounded-lg and sm:h-32 sm:w-32 with object-cover.
Describe building the second column with a title, company, and color swatch using inline styles for hex colors and Tailwind classes, highlighting dynamic class pitfalls.
Set up the fourth column to show the price formatted as dollars with tailwind styles, and the third column to manage cart item amounts and remove items with cart slice.
Set up the user slice to manage login state, register, and jwt tokens, store user data in local storage, and enable access to checkout and orders only when logged in.
Learn to send register and login requests with post in axios, handle username, email, and password, store the JWT in local storage, and route users through register and login flows.
Create a register page with a submit button, inputs for username, email, and password, and a login link, using an action function with loading support.
Demonstrate how React Router actions handle form mutations, posting user data to an API to register a user and return a json web token.
Demonstrates registering a user via a post to /auth/local/register, handling success with a redirect to login and errors with toasts and axios error insights.
Create a reusable submit button component in React with TypeScript that uses useNavigation from react-router-dom to show submitting state, disables the button, and displays a loading spinner with text and className.
Construct a login page by importing form components and actions, then render a centered card with email/identifier and password fields, plus a guest login option and register link.
Login as a guest user by posting to the server with hardcoded identifier test@test.com and secret, then save the username and JWT in state and local storage and navigate home.
Implement a login user action that reads form data, posts to /auth/local, dispatches user with jwt on success, and handles errors with a toast.
Control the user state in the header by showing login or register links, and when authenticated, checkout and orders, while syncing the user with local storage and triggering toast notifications.
Access the user state via the user app selector to conditionally render links and the cart button, revealing checkout and orders only when a user is logged in.
Builds a functional checkout page with a cart totals section and a checkout form for first name and address, enabling order placement and server confirmation visible in the orders page.
Protect the checkout page by checking the user in the loader, hiding links for anonymous users, displaying a login toast, and redirecting to the login page.
Set up the checkout form component with two inputs and a post action, wiring a Redux store action to handle form data.
build an authenticated checkout action in typescript that posts order data to /orders, including name, address, cart items and totals, with front-end validation and post-success redirect.
Build an orders page that displays a list of orders, uses a valid token for API calls, and models an orders response with data and meta for pagination.
Implement a loader for the orders page, including a complex pagination container, user validation with redirect to login, and an authenticated fetch of orders using custom fetch and Redux store.
Render the orders page using meta pagination to conditionally display the orders list, integrate the Shotzi table components, and format order data such as name, address, items, total, and date.
Learn to render a complex pagination component by manually constructing buttons and ellipses, with prev/next controls and dynamic active states based on the current page.
Add a dedicated underscore redirect file to pair React Router with Netlify, then build locally to catch TypeScript errors before deploying via Netlify from GitHub.
Dive into the world of TypeScript with our "Practical TypeScript" course, designed for developers seeking a comprehensive understanding from the basics to advanced concepts. This course begins with setting up a TypeScript project using Vite, guiding you through a series of tutorials that cover essential TypeScript features and best practices.
You'll learn about type annotations, type inference, and the practical applications of type annotation, along with an exploration of union types and the handling of "any", "unknown", and "never" types. The course also covers the fundamentals of arrays and objects, and introduces challenges to reinforce learning. Additionally, you'll delve into the complexities of functions in TypeScript.
As you advance, the course explores more sophisticated TypeScript features, such as generics, fetching data with TypeScript, and working with the Zod library for data validation. You'll also gain insights into TypeScript declaration files and class-based programming with TypeScript. Each tutorial is designed to provide hands-on experience, enabling you to effectively apply TypeScript features in real-world scenarios.
Furthermore, this course extends to integrating TypeScript with React, covering component structure, prop handling, state management, event handling, and complex component structures. You'll learn about using React's Context API, reducers, and global state management in a TypeScript environment, as well as data fetching and validation techniques. The course concludes with a practical task management application, highlighting the use of localStorage and task state management.
Finally, the course culminates in building a modern store application with TypeScript, Shadcn/ui, and React Router, incorporating features such as authentication and pagination. Join us in "Practical TypeScript" to elevate your skills and confidently apply TypeScript in your development projects, from basic to advanced levels.