Skip to content

Instantly share code, notes, and snippets.

@sabesansathananthan
Created October 7, 2021 18:03
Show Gist options
  • Save sabesansathananthan/aae36d47ae2523cc8419df3051a72895 to your computer and use it in GitHub Desktop.
Save sabesansathananthan/aae36d47ae2523cc8419df3051a72895 to your computer and use it in GitHub Desktop.
Using Absolute Imports in ReactJs
import React from 'react';
import Button from '../../Button/Button';
import { LINKS, STRINGS } from '../../../utils/constants';
import styles from './App.module.css';
function App() {
return (
<div className={styles.App}>
<Button>
{STRINGS.HELLO}
</Button>
<a href={LINKS.HELP}>Learn more</a>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment