alan2207 / bulletproof-react

🛡️ ⚛️ A simple, scalable, and powerful architecture for building production ready React applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency cycle

w6fux5 opened this issue · comments

lib/auth.tsx
import { loginWithEmailAndPassword, ... } from '@/features/auth';

features/auth/components/LoginForm.tsx
import { useAuth } from '@/lib/auth';

Wouldn't this Dependency cycle?

Hi there!

You are right, it is. As the matter of fact, this is not the only case in the app, there are more.
If you add the "import/no-cycle" rule to the eslint configuration, you can see them all.

This is something that has been overlooked when the app was initially built, but I am already aware of the issue and plan to update the application when I get the time to do so.

Thanks for reporting it.

@alan2207 I believe lib layer should know nothing about features layer