Sharing code between slices (forbidden) #822
Unanswered
RemyMachado
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Where should slices' shared code go?
The documentation says that "there should be no code sharing in that folder.", speaking here about code shared inside a slice.
I kind of understand why this rule exists. If we started having shared code on each and every nested folder, it would be really hard to navigate around.
However, the documentation doesn't explain what's recommended in this very case.
Where should this code go? Let's say it's several UI components. I would have instinctively done the following:
I don't think I should put it in the
shared
root folder either as this code is only intended to be shared betweenfeatures/post
's slice groups.Beta Was this translation helpful? Give feedback.
All reactions