MENU

Fun & Interesting

How to build a Recursive React Component

Sam Selikoff 57,938 9 months ago
Video Not Working? Fix It Now

Learn how recursion works in React by building a simple filesystem viewer. 🚀 Sign up to hear about my new course: https://buildui.com/courses/advanced-react-component-patterns 💻 Check out the code from the demo: https://buildui.com/recipes/recursive-filetree Timestamps: 0:00 - Intro 2:51 - Adding subfolders 4:53 - Extracting a Folder component 5:37 - Adding Recursion 9:43 - How to type recursive components 11:30 - Adding files 13:52 - Making the folders collapsible 18:24 - Refactoring and polish 19:45 - Final demo 20:23 - New course!

Comment