Skip to content
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

[CRITICAL] All cards are almost equal #4

Open
ale1313 opened this issue Sep 9, 2020 · 1 comment
Open

[CRITICAL] All cards are almost equal #4

ale1313 opened this issue Sep 9, 2020 · 1 comment

Comments

@ale1313
Copy link

ale1313 commented Sep 9, 2020

I saw that you made 3 card components for each type. The way you made it, you can use a single component to handle all 3 types.

EDIT: You can do the same with the card containers.

@gomezlucas
Copy link
Owner

I made a new component "Card.js" and erased the 3 types Components:
https://github.com/gomezlucas/RickandMorty-Challenge/tree/master/src/components/Card

Also I noticed that I could do the same with the Modals, but since the data I should display differs between the components, I didn't apply the same solution, you can check the component:
https://github.com/gomezlucas/RickandMorty-Challenge/tree/master/src/components/modal

About CardContainers, its main purpose is connecting the components with the store to deliver the right information (like screens in RN) I m not sure if I should just use a single component for them. I think It's more organized and more understandable as well in the way I did it. I would like to know your insight about that.

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

No branches or pull requests

2 participants