koredefashokun / lemmy-mobile

Mobile client for Lemmy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Require cycle on comment nodes

mariot opened this issue · comments

Require cycle: src\components\CommentNodes.tsx -> src\components\CommentNode.tsx -> src\components\CommentNodes.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.

Thanks for running the project locally! Unfortunately, as far as I know, this is a warning, and it's the only way we can get this working, since we have to recursively import the CommentNodes component for every CommentNode and vice-versa. You can take a look at the source code for Lemmy's web frontend here. This project tries to match that implementation as closely as possible.