正在加载视频...

视频加载失败

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

137,135 次观看 • 3 年前 •via X (Twitter)

10 条评论

George Moller 的头像
George Moller3 年前

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

Amit 的头像
Amit3 年前

That smooth animation in your content is very attractive!

George Moller 的头像
George Moller3 年前

Glad you liked it Amit! :)

Kamil Barth 的头像
Kamil Barth3 年前

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 的头像
Sachin Kumar3 年前

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 的头像
George Moller3 年前

You can configure both!

Ved Prakash Yadav 的头像
Ved Prakash Yadav3 年前

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

Anton Zaremba 的头像
Anton Zaremba3 年前

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

Q 的头像
Q3 年前

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

George Moller 的头像
George Moller3 年前

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

相关视频