-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example ducks-tinder #687
base: master
Are you sure you want to change the base?
Conversation
👷 Deploy request for pr-fsd accepted.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the example! Could you run our linter and make sure there are no FSD violations?
npx steiger ./src
Thank you for mentioning it, I've solved lots of issues because of steiger. |
The cross-imports are kind of a blocker. Particularly because I don't think that |
If you are talking about using hocs without composition in pages f.e. for every page make N hocs composition like I just can't figure out how to implement such a behaviour without so silly composition on the same layer) |
I don't think that's very probable because your pages will be missing functionality of these HOCs, which will probably be caught in testing or even type checking. |
I fixed these cross-import issues via routing composition like wrapping in "hoc'ed" component neccessary pages/widgets etc... |
The As for the HOCs, I'm not a big fan of making a page slice just for HOCs. It's not a page, and HOCs are not a business domain, so using slices to keep HOCs doesn't look correct to me. Why not move these compositions of HOCs to the App layer? I also noticed that you have |
I just meant that in terms of my app, where widgets are encapsulating some kinda top logic and etc)
Where to place them if App layer can't have ui segment? In terms of the current solution via router composition "hoc'ed" components are ui...
Of course, maybe I didn't check it, because when I was fixing steiger errors I put them in ui thinking that it causes an error f.e. how it was with the other layers) |
HOCs are not UI typically. They are components, but they are not UI. Each HOC has its own purpose, you can use that purpose to place HOCs in different segments.
I'm not sure I understand what you mean |
Sorry for being so late. |
Still not great, because |
Yes, you're right. I refactored hoc composition behaviour and now components subscribe to hoc composition updates to have relevant hocs. I add hocs to the composition in the app lib so the hocs list will be controlled from the one place. All you need is just to subscribe the component to the composition via another hoc... Too many hocs XD UPD: of course I removed compositions to the shared and reverted feature-hocs placement |
Background
Add new example
Deploy is using mocks and it lacks of server logic, cause server is another big project and it takes lots of time to work together with no problems, so only mocks now. I'm planning to continue working on this project (tinder)