惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
AWS News Blog
AWS News Blog
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tailwind CSS Blog
PCI Perspectives
PCI Perspectives
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
IT之家
IT之家
V2EX - 技术
V2EX - 技术
Cloudbric
Cloudbric
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
宝玉的分享
宝玉的分享
Know Your Adversary
Know Your Adversary
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Schneier on Security
博客园 - 【当耐特】
G
Google Developers Blog
S
Security @ Cisco Blogs
N
Netflix TechBlog - Medium
T
Tenable Blog
C
Check Point Blog
The Cloudflare Blog
J
Java Code Geeks
The Register - Security
The Register - Security
Google Online Security Blog
Google Online Security Blog
Security Latest
Security Latest
T
Tor Project blog
T
The Blog of Author Tim Ferriss
S
Security Affairs
S
Securelist
P
Privacy & Cybersecurity Law Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
G
GRAHAM CLULEY
Jina AI
Jina AI
Spread Privacy
Spread Privacy

Kent C. Dodds Blog

Implementing Hybrid Semantic + Lexical Search Simplifying Containers with Cloudflare Sandboxes Migrating to Workspaces and Nx Offloading FFmpeg with Cloudflare Building Semantic Search on my Content Helping YOU ask ME questions with AI How I used Cursor to Migrate Frameworks The Dow's Start on the Covenant Path 2025 in Review The next chapter: EpicAI.pro AI is taking your job How I increased my visibility Launching Epic Web 2023 in Review Stop Being a Junior RSC with Dan Abramov and Joe Savona Live Stream Fixing a Memory Leak in a Production Node.js App 2022 in Review My Car Accident I Migrated from a Postgres Cluster to Distributed SQLite with LiteFS I'm building EpicWeb.dev A review of my time at Remix Remix: The Yang to React's Yin How I help you build better websites Why I Love Remix The State Initializer Pattern How to React ⚛️ Get a catch block error message with TypeScript Building an awesome image loading experience How Remix makes CSS clashes predictable Introducing the new kentcdodds.com How I built a modern website in 2021 How to use React Context effectively Static vs Unit vs Integration vs E2E Testing for Frontend Apps The Testing Trophy and Testing Classifications Array reduce vs chaining vs for loop Don't Solve Problems, Eliminate Them Super Simple Start to Remix Super Simple Start to ESModules in Node.js JavaScript Pass By Value Function Parameters How to write a Constrained Identity Function (CIF) in TypeScript How to optimize your context value How to write a React Component in TypeScript TypeScript Function Syntaxes Listify a JavaScript Array Build vs Buy: Component Libraries edition Using fetch with TypeScript Wrapping React.useState with TypeScript Define function overload types with TypeScript 2020 in Review Business and Engineering alignment Hi, thanks for reaching out to me 👋 useEffect vs useLayoutEffect Super simple start to Firebase functions Super simple start to Netlify functions Super Simple Start to css variables Favor Progress Over Pride in Open Source Testing Implementation Details How getting into Open Source has been awesome for me useState lazy initialization and function updates Use ternaries rather than && in JSX Application State Management with React Use react-error-boundary to handle errors in React JavaScript to Know for React How I structure Express apps What open source project should I contribute to? When I follow TDD AHA Programming 💡 How I Record Educational Videos Should I write a test or fix a bug? Stop mocking fetch Intentional Career Building Improve test error messages of your abstractions Tracing user interactions with React Eliminate an entire category of bugs with a few simple tools Common mistakes with React Testing Library Super Simple Start to React Stop using client-side route redirects The State Reducer Pattern with React Hooks Function forms Replace axios with a simple custom fetch wrapper How to test custom React hooks React Production Performance Monitoring Should I useState or useReducer? Stop using isLoading booleans Make Your Test Fail Make your own DevTools An Argument for Automation Fix the "not wrapped in act(...)" warning Super Simple Start to ESModules in the Browser Implementing a simple state machine library in JavaScript 2010s Decade in Review Why users care about how you write code Why I avoid nesting closures Don't call a React function component Why your team needs TestingJavaScript.com Inversion of Control Understanding React's key prop How to Enable React Concurrent Mode Profile a React App for Performance
Building Production Apps 100% in the browser
2018-01-15 · via Kent C. Dodds Blog

Earlier, I mentioned that I made two apps for my family. The first is Typing for Kids which I made for my two oldest children, the second is Repeat Todo which I made for my wife.

Today I want to briefly talk about how I went about creating these apps as a way to reiterate how awesome it is to build for the web these days.

Typing for Kids ⌨️

I'll start with Typing for Kids because it's a fair amount simpler. I built it because my kids often like to borrow my laptop to type like they see daddy doing. The problem is my keyboard's repeat rate is set really fast, so they have a hard time pressing the key fast enough to avoid the key repeating many times. So the experience isn't altogether awesome. So I built typing for kids to help them learn where the keys are on the keyboard and make it a more enjoyable experience for them.

First off, my kids love it. So it's a super success. Also, it's only 3 files. It doesn't use redux or even react-router. In fact, all the state lives in the top-level component. Here's the entire component tree:

entire component tree

You'll notice there are only 3 components. It's a ridiculously simple app. It depends on react, react-dom and animate.css. I have a component to make integrating with animate.css a little easier.

Another thing you'll find interesting is that I built the ENTIRE thing solely in CodeSandbox.io! I never downloaded the source code once. I used CodeSandbox's new GitHub integration feature to create the repository, then their GitHub import feature any time I wanted to start working on it again. This is pretty amazing I think!

To get it deployed, I used the amazing Netlify. They have super GitHub integration as well which meant I didn't need to download anything for that part either.

On top of that, because codesandbox's react template uses create-react-app, I could leverage the service worker that the react-scripts build creates for me so this thing works totally offline. I also added a manifest.json so when I pulled it up on my kids Chromebook I could add it directly to the desktop like an installed app! So cool!

Repeat Todo ✅

A while back I created repeat todo for my wife because she wanted an app where she could rotate chores/meals etc. Here's a quick demo of the new version of the app to get an idea of what it's useful for:

demo of repeat todo

It was awesome, but pretty limited because it uses local storage which means you can only enter in the items on the device you'll use it on and if you get a new device all the data is totally lost.

For a while I've been meaning to make an authenticated version with Firebase as an authentication/storage provider to solve these problems, so I decided to do that for her Christmas present.

Amazingly, I was able to build this just like the Typing for Kids app. 100% in the browser without having to download anything.

This app is a little more complicated. Despite that it still doesn't use react-router or redux. It's a pretty simple app, and that's the beauty of it I think. I did make a few more components via glamorous to make things visually consistent and separate the styling components from the rest of the components. I also created a few render prop components for the firebase authentication and data stuff.

You can find most of the interesting stuff in the index.js file. I think the thing that made it the most complicated is that Firebase doesn't work super well with arrays and because order mattered (things will one day be resortable by the user, open issue, help wanted), I had to store it as an object and manually keep the order values correct.

All-in-all it was a pretty fun experience and because firebase works so well offline, this app can also leverage the service worker that react-scripts gives me and can be an installable PWA on Android phones which I think is pretty neat.

Conclusion

What I love about this is how our tools have leveled the playing field. All of these tools are 100% free so long as you have access to a computer with internet access. Even if that computer is not yours, you don't have to download anything, but you can still build amazing applications right in the browser and it's not a terrible experience. It's a wonderful experience. The reason I didn't download anything wasn't because I was trying to see if I could avoid it. It was because I couldn't think of a reason why I'd really want to.

Another thing that I think you can take away from this is that as I built these things, I learned stuff. I think that building things should be the way you decide what to learn. Constantly consuming content just because it's out there is fine, but it's hard to put it into context. If you're in the midst of building something, it'll be a lot more valuable to you and stick much better.

So try to identify a real (small) problem that you or your loved ones are facing and build something to solve that problem. You'll learn a bunch!

I hope this is helpful! Good luck!👍