DEV Community

Sirwan Afifi
Sirwan Afifi

Posted on


React Tree View using TailwindCSS/TypeScript/Storybook/Context API

I have built this simple project over the last couple of days. I wanted to build a simple tree view component for one of my projects I thought it might be a good idea to share it on Github so that everyone can have a look/review on it. I hope you like it:

Alt Text

Here's the source code: (

Top comments (2)

javier1412 profile image
hungnguyen1412 • Edited

Nice, but can it draggable?

sirwanafifi profile image
Sirwan Afifi

sure, If I find some free time, I will add it.

11 Tips That Make You a Better Typescript Programmer


1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields


Read the whole post now!