Skip to content

Conversation

@Gaic4o
Copy link
Collaborator

@Gaic4o Gaic4o commented Dec 18, 2025

Background

This PR adds a new Routing documentation page for Feature-Sliced Design. It clarifies that routing/redirect decisions should live in the app and pages layers, while lower layers communicate behavior via callbacks and remain unaware of concrete path strings. The examples were refined based on prior Telegram discussion history to reflect real-world usage.

@Gaic4o Gaic4o changed the title docs: code smells/routes add docs: code smells/routing add Dec 18, 2025
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
pr-fsd ✅ Ready (View Log) Visit Preview 512723c

@illright
Copy link
Member

Thanks for pushing this! The article feels very well-written, though I don't agree with some of its suggestions.

Overall, I think there's a big slice of projects that aren't going to benefit from most of these rules except for, perhaps, separating route constants into a centralized object. If you agree, I would suggest to structure the article into two parts, the basic one, including just the route constants, and then the more complicated/decoupled approach, along with the reasons not to do it.

I also think that this article fits better in the Guides > Examples section, however poorly named that section is. It's less about "examples" and more about "practical problems in frontend". I wouldn't call routing a code smell or issue :p

One more thing that I think we could cover with this article — routing as a responsibility of the state manager. In the Russian-speaking community there are two state managers that are well-known — Effector and Reatom. Both of them offer plugins that let the state manager take control of routing, which is quite well integrated into its ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants