The Call Kent podcast is a regular podcast where you call in with a question and Kent answers. Call in with your questions right from your web browser with any device at https://kentcdodds.com/call
Progress bar for mutations in Remix
Hi Kent!
How do you create a progress bar for actions in Remix?
Like if a request takes maybe 10 or 20 seconds to finish and you want to give your users some feedback that things are progressing?
Best regards,
Jan
useNavigation
kentcdodds.com progress
epic-stack progress
Progress bar for mutations in Remix
2/9/2024 • 9 minutes, 13 seconds
Mocking in the full stack metaframework Era
When we were building client side application mocking during e2e tests was a bit easier because you could just monkey patch fetch and call it a day. Today we also control the server so the line has a bit shifted. There are solutions, like MSW, to mock on the server side too but what if instead of an API call you query a db?
Mocking in the full stack metaframework Era
2/8/2024 • 10 minutes, 14 seconds
How do you create advanced content for developers
The content for new developers is everywhere, but finding quality insight that helps you level to senior and above is hard to come by. This is in part because such content is difficult and time consuming to make. What goes into making such content and is there a lack of it in our industry?
How do you create advanced content for developers
1/29/2024 • 9 minutes, 54 seconds
A Button Per form or One Form with Multiple Buttons
Hi Kent,
It's Jan 👋
When creating a dropdown menu (e.g. to pick a role in an organization), would you wrap the whole menu in a form tag and then render multiple buttons within that form (one for each role)? Or would you render multiple forms (one for each role) with each having their own submit button?
Thanks a ton if you answer!
Best regards,
Jan
A Button Per form or One Form with Multiple Buttons
1/26/2024 • 4 minutes, 50 seconds
Toasts in Remix
Hi Kent,
It's Jan.
I'm currently working on implementing toasts in a Remix app. I was using the Epic Stack as a reference.
BTW, thank you for creating it, it's so nice to take some features and functionalities from it when you need them!
Anyways, it looks like the implementation of the toast in the Epic Stack does NOT work with JavaScript disabled. But theoretically, you could make toasts in Remix progressively enhanced by giving the close button a form and prevent default when JavaScript is enabled.
It looks like the library you're using in the Epic Stack - Sonner - does NOT expose the close button, so you can't progressively enhance it.
Was it a conscious decision to make the toast JavaScript only? Or let me ask the decision more openly, what are your thoughts on this?
As always,
thanks a ton!
Toasts in Remix
1/16/2024 • 6 minutes, 38 seconds
Unpaid internships and indentured servitude
So, recently I started looking for my first software job. The first offer I received was from a company looking for an intern. The internship had the following conditions: 1) the first 3 months of it are unpaid 2) you have to sign a contract after the 1st month of it that obligates you to stay at the company 2 years after the internship is ended. I rejected it because I felt like you never know what that company may turn out to be. For example, it may try to exploit you and pay you the bare minimum for the job you're doing preventing your career growth and your only option may be to wait for that contract to expire and then start looking for a higher position at another company. I'd like to ask your opinion about:
unpaid internships
internships that obligate you to stay at the company for 1 or 2 years once the internship is ended
companies that follow both of these practices
Unpaid internships and indentured servitude
1/15/2024 • 4 minutes, 56 seconds
It's fine to re-render
My question is around the optimization techniques that a lot of people apply to React apps. I see very often how devs focus on executing their components only once or twice. What I think matters at the end is if there any changes in the actual DOM tree. If not they in theory should be ok to see your functional components fired many times.
One React mistake that's slowing you down
Improve the Performance of your React Forms
Fix the slow render before you fix the re-render
One simple trick to optimize React re-renders
It's fine to re-render
1/12/2024 • 9 minutes, 56 seconds
Data Structures and Algorithms
Is Data Structures and Algorithms is necessary to become a successful full-stack engineer?
Data Structures and Algorithms
1/8/2024 • 4 minutes, 26 seconds
Remix Flat Routes vs Remix v2 Router
What are the pros and cons of the flat routes vs the v2 router? Are you planning to switch at some point?
New File System Route Conventions by Ryan
Remix Flat Routes vs Remix v2 Router
1/5/2024 • 5 minutes, 26 seconds
Generating CSS with Remix Resource Routes
Hi Kent. I am building an app where product sellers can add their products and they by default get a website listing their products.
On the app can make some basic customizations for their store website such as color, border radius etc. And each store owner's website is a subdomain. e.g kentstore.xyz.com
I am using remix for the stores. On page load, I want to fetch the styling config for the website from the db.
What would be the best approach for this ?. Your insight would be very valuable to me
I look forward to your response.
PS: I am totally loving the epic-web course. You're simply amazing.
Remix Resource Routes docs
Epic Web Resource Routes Exercise
Generating CSS with Remix Resource Routes
1/4/2024 • 4 minutes, 52 seconds
Using Downshift with Conform to manage an input
Hi Kent ! I'm Virgile, big fan of your work, and I have a question regarding your article 'Full Stack Component'.
I am currently using a combobox, managed by useCombobox from the downshift library.
But I would like conform to take over the input props management, while still getting the autocomplete features.
I'm curious how you would implement it.
Turn Progressive Enhancement up to 11
Using Downshift with Conform to manage an input
1/3/2024 • 6 minutes, 22 seconds
Jake Lazaroff’s article on Web Components
Curious about your thoughts on this article Web Components Will Outlive Your JavaScript Framework
Why I don't use web components
Jake Lazaroff’s article on Web Components
12/19/2023 • 7 minutes, 49 seconds
Code Organization in Full Stack Apps
Do you have some best practices for scale Remix applications with Prisma regarding testability, reusability, and separation of concerns? When do you decide to move functions and business logic from loaders and actions to a .server file? Do you have functions like getUsers in a user.server file or do you call the database directly in the loaders?
Code Organization in Full Stack Apps
11/21/2023 • 4 minutes, 17 seconds
Client Hints and profiling
Can home made client hints like the one you are using in Epic Web Stack be seen as profiling?
Use Client Hints to Eliminate Content Layout Shift
Client Hints and profiling
11/16/2023 • 4 minutes, 21 seconds
Building and Testing an MDX-based Blog
What is a good way to test fs modules and why converting MDX on runtime is better than runtime.
Building and Testing an MDX-based Blog
10/27/2023 • 6 minutes, 58 seconds
EpicWeb.dev is now available!
Yes, this is Kent calling himself. I just wanted to let all subscribers to the podcast know that https://EpicWeb.dev is available today!
EpicWeb.dev is now available!
10/18/2023 • 2 minutes, 30 seconds
What is full stack for EpicWeb.dev?
What do you consider full stack? E.g. some people think that full-stack should include devOps, some don't. What do you think? And does EpicWeb consider devOps to be apart full stack?
Deploy Web Applications All Over the World
What is full stack for EpicWeb.dev?
10/10/2023 • 3 minutes, 10 seconds
Improving as a software engineer
Foundational knowledge needed to build complex systems in software
Improving as a software engineer
9/22/2023 • 6 minutes, 25 seconds
Why didn't you break root.tsx into smaller components?
root.tsx is over 300 lines. Is there a reason for keeping all the functions in one file? Why don't you split each function in separate a file and import it?
When to break up a component into multiple components
Why didn't you break root.tsx into smaller components?
9/21/2023 • 3 minutes, 10 seconds
Am I stuck in tutorial heck?
Recently I quit my job as frontend development instructor and I'm aiming to get a job as frontend developer. Before I apply for job openings I'm planning to go through several courses, create complex projects for my portfolio and only then apply for the job.
My friends are saying I'm overcomplicating the process and I may get into the flow after I got the work. But as I'm aiming at middle level positions, I want to prepare as much time, as much my budget allows. So I can negotiate salary well with employers and will be more valuable worker.
What are your thoughts on this?
Am I stuck in tutorial heck?
9/12/2023 • 6 minutes, 37 seconds
Scaling Epic-Stack in a single region
Hi Kent, my name is Tim,
I have a few questions regarding scaling the Epic Stack within a single region.
With the assumption that we are having huge amount of users in one region, my question is would you recommend switching to other database technologies or would you have multiple SQLite replicas in the same region, with each of them being connected to remix apps in a 1-1 manner
My second question is, assuming that we have the epic stack setup, what would you do if one remix server can't just keep up anymore with the load. Would you introduce caching or any types of application or additional threads to distribute and keep up with the work load
Thank you
Scaling Epic-Stack in a single region
9/12/2023 • 5 minutes, 9 seconds
React Lazy initializers Call Order
I am seeing Lazy initializers are not calling first, but in the diagram it motioned it calls first
React Lazy initializers Call Order
8/31/2023 • 2 minutes, 39 seconds
How do you approach major project updates
I would love to hear your thoughts on approaching major project refactors. We all have been in that situation where you want to use the newest things available, but the codebase is really old. Do you create a new project? Do you try to update component by component? Is there a "don't go that route"?
How do you approach major project updates
8/29/2023 • 7 minutes, 16 seconds
Organizing your first workshop
I was approached recently to give a full-day workshop at a conference I'm excited about. But... how hard is it to organize a curriculum? What questions should I ask the organizers ahead-of-time before saying yes?
How I Teach
Organizing your first workshop
8/25/2023 • 28 minutes, 27 seconds
Conform sets novalidate & validation attributes?
Hey, Kent! I'm trying out @conform-to/react, specifically the useForm hook. I noticed that it sets novalidate: true on the form even if JavaScript is disabled. I'm wondering: Why does it add validation attributes to the inputs then if they're not being used for validation anyway, regardless of whether JavaScript is enabled or not?
Conform sets novalidate & validation attributes?
8/24/2023 • 4 minutes, 36 seconds
My skill stuck at current job, should I quit?
I have been in current team for couple years, and feel my skills are kind of stuck because I have spent too much time fighting with the team refusing to get better. I have learned only from myself, but not much from the others, and can't really fix everything by myself.
Business and Engineering alignment
My time has been spent inefficiently to be honest in the past few years because lots of the time I was staring at smelly and nonsense codes, trying to improve but never get the resource or momentum from the team. I start feeling left behind in terms of the skills the market really needs, and job is not secured considering the layoff happening at recent time.
I'd like to know if you have similar experience, how you handle this, or is it just the time I should leave to seek for better opportunity I can grow? Thanks!
My skill stuck at current job, should I quit?
8/23/2023 • 7 minutes, 20 seconds
How do you host your videos?
Hi Kent!
I was wondering, how do you host your videos?
Such as: https://www.epicweb.dev/tips/quickly-determine-whether-a-module-is-bundled
It looks like they're custom hosted, so I was wondering how you do that.
The Epic Stack shows how you save images, and it would be interesting to learn how you host videos, too.
Thank you and best regards,
Jan
Skill Recordings
Mux
How do you host your videos?
8/10/2023 • 3 minutes, 57 seconds
How are you still productive!?
What's changed from 2018 in regards to how you're able to achieve such high levels of productivity? Do you still spend more time producing than ingesting courses?
How I am so productive
How are you still productive!?
8/3/2023 • 7 minutes, 35 seconds
Best practice for using localStorage in React
Lots of examples demonstrate wrapping localStorage setters and getters in hook, but no one ever explains why they don't just use localStorage directly.
Best practice for using localStorage in React
7/18/2023 • 9 minutes, 20 seconds
Remix Full-Stack Components (vs Server Components)
With React Server Components getting more traction, this idea of each component being able to fetch its own data seems to getting more popular rather than data-fetching being purely route-based.
In Remix-land, you’ve had a talk about “full-stack components” with a similar concept where a “resource route” can have no default exports but still export a loader and a React component in order to have a reusable component with its own data fetching.
It seems there might be differences between React Server Components and these “full-stack components” though, especially in that Server Components don’t need to be defined in routes but Remix full-stack components do.
Firstly, how are the two approaches different?
I ask, because I know Remix is working on implementing Server Components without the foot-guns, so curious what how the mental model would change in the future.
You, also said that it isn’t a good practice to get into to commonly import components from other routes.
My second question is why is it not a good practice, and can you give examples for cases where it would or wouldn’t make sense to import full-stack components from other routes?
Thank you!
Full Stack Components
Remix Full-Stack Components (vs Server Components)
7/13/2023 • 7 minutes, 44 seconds
A 10 year old itch to make a switch (QA to dev)
For 10 years, I feel that I've been separated away from my true love, which was coding. I'm 35 now, married, and have a kid. Some people say that its too late to be a developer now. But, I want to give it just one shot so I wouldn't have any regrets later. This time, I'm following my heart! Away I sail, onto this pathless path.
How to get experience as a software engineer
The Beginner's Guide to React
EpicReact.dev
EpicWeb.dev
A 10 year old itch to make a switch (QA to dev)
7/10/2023 • 11 minutes, 52 seconds
Should I go to college or not?
looking for directionShould I go to college or not?
6/29/2023 • 9 minutes, 47 seconds
Resources to learn senior development skills
As my career has progressed, the types of problems I face have also progressed - questions like "How should we architect this solution" and "How should we decide between these trade-offs". However, I've struggled to find resources to help me learn these skills. Are there any resources that you would recommend and, in general, how do you continue to learn and progress even as you reach more senior levels of development?How to get experience as a software engineerResources to learn senior development skills
6/22/2023 • 7 minutes, 37 seconds
Passing state across components in RemixJS
If I was just using plain React, I would use the Context API or even global variables to keep track of the state of an application. Whats the best way to achieve this when using Remix?useOutletContextP.S. You can definitely still use context if you like!Passing state across components in RemixJS
6/19/2023 • 6 minutes, 48 seconds
How To Deal with Hiring Developers?
I have to manage my projects and outsource them, otherwise, I would never make enough money to keep my business afloat. I have this problem, where, when I start a project, the product owner will ask questions like, "What happens if you die?" and my best answer to that is, "That's why we have employees". But, when I go to hire employees, sometimes they completely just ignore the stack that I'm using and they go off and do their own thing, which becomes difficult to manage. Should I be ruling with an iron fist, or should I just be more of a liason between my clients and my developers?How To Deal with Hiring Developers?
6/16/2023 • 10 minutes, 6 seconds
Why do you use the Express adapter for your app?
I've seen you're using the Express adapter for your Epic Stack and your personal website, as opposed to just running the Remix dev server. Why is that? Are there any performance implications?Why do you use the Express adapter for your app?