Skip navigation
⚛️ React Tip: Clean up your code by using absolute imports + module aliases ↓
0:00 / 0:22

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

George Moller

@_georgemoller117K followers

Visit on X
1,570 likesDownloadOriginal post

137,194 views

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

10 Comments

Comments from the original post on X (Twitter)

  • George Moller's profile picture

    @_georgemoller

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

    9 likes

  • Amit's profile picture

    @Amit_T18

    That smooth animation in your content is very attractive!

    5 likes

  • George Moller's profile picture

    @_georgemoller

    Glad you liked it Amit! :)

    1 like

  • Kamil Barth's profile picture

    @BarthKamil

    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.

    3 likes

  • Sachin Kumar's profile picture

    @dreadwing5

    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 😕

    3 likes

  • George Moller's profile picture

    @_georgemoller

    You can configure both!

  • Ved Prakash Yadav's profile picture

    @codewithved_

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

    2 likes

  • Anton Zaremba's profile picture

    @AntonZarembo

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

    2 likes

  • Q's profile picture

    @whichqudus

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

    1 like

  • George Moller's profile picture

    @_georgemoller

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

    1 like