This is not a very important rule but complying with it is not gonna have harm either.
The priority is like below:
- Imports from React except for types. e.g. hooks and ...
import { useState } from "react";
- Kits
import Text from "@kits/Text";
- Components
import AnyComponent from "@components/AnyComponent";
- Contexts
import LayoutProvider from "@contexts/Layout/Provider";
- Hooks
import useToggle from "@hooks/useToggle";
- Utils
import Http from "@utils/Http";
- Helpers
import LayoutHelper from "@helpers/layout";
- Services
import AuthServices from "@services/auth";
- Configs
import { appBaseURL } from "@configs/utl";
- Constants
import { TOKEN_COOKIE_KEY } from "@constants/cookies";
- Static Files
import appLogo from "@images";
import "path/to/a/css/file.css";
- Types
import type { FC, PropsWithChildren } from "react";
import type DivProps from "@kits/Div/props";