Loading video...

Video Failed to Load

Go Home

⚛️ React Tip: Clean up your code by using absolute imports + module aliases ↓

137,135 views • 3 years ago •via X (Twitter)

10 Comments

George Moller's profile picture
George Moller3 years ago

Hey there 👋, Friendly reminder that I have more than 100 infographics and video animations just like this one. Check them out ↓

Amit's profile picture
Amit3 years ago

That smooth animation in your content is very attractive!

George Moller's profile picture
George Moller3 years ago

Glad you liked it Amit! :)

Kamil Barth's profile picture
Kamil Barth3 years ago

How the fuck is this a react tip? This is literally a Typescript functionality Tbf if any react dev finds any of those tips useful i will never believe they know what they are doing.

Sachin Kumar's profile picture
Sachin Kumar3 years ago

Not sure if the aliasing will be good. Like I can't click on the import to open the file and see the code when I use the aliasing. Also not sure if it will give me intellisense for the component path 😕

George Moller's profile picture
George Moller3 years ago

You can configure both!

Ved Prakash Yadav's profile picture
Ved Prakash Yadav3 years ago

This is really great. Can you tell how to create this type of animation? Any tool for it?

Anton Zaremba's profile picture
Anton Zaremba3 years ago

It's better if you only have one root alias, like so: "@/*": ["./*"]

Q's profile picture
Q3 years ago

Hi George, which file are we adding the module aliases rule to?

George Moller's profile picture
George Moller3 years ago

@____bajomo sorry I didn't reply earlier but should be tsconfig.json/jsconfig.json

Related Videos