react-shop / react-ecommerce

E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
MIT License
196 stars 56 forks source link

[WEB] - Refactor Project #14

Closed viniarruda closed 4 years ago

viniarruda commented 4 years ago

The idea is refactor the project and the api to include better solutions and create a open source project to help people create a complete and easy e-commerce.

The e-commerce project it will be changed to: (in construction)

The Api will be changed to:

Future Features

MateusAndrade commented 4 years ago

Using reslect for redux would be a great addition. I think that on some cases, we will need to save a lot of info at the store or make complex calculations, etc.

viniarruda commented 4 years ago

Using reslect for redux would be a great addition. I think that on some cases, we will need to save a lot of info at the store or make complex calculations, etc.

Yes, I agree. Is very simple for create a selector for cart functions using reselect

w3bdesign commented 4 years ago

What about Context instead of Redux? Would save you from having to use Redux.

viniarruda commented 4 years ago

What about Context instead of Redux? Would save you from having to use Redux.

Only context is very bad, because don't have a largest performance, but using Context + Hooks, is a good thing, because is very similar to redux implementation. I have a example here: https://github.com/viniarruda/spotify-project

My idea is use redux with hooks, and redux-saga to test the idea in a "largest" project, focusing in perfomance and tests, but we can use Context + hooks in native app, is a good idea too.

lmeireles commented 4 years ago

What about Context instead of Redux? Would save you from having to use Redux.

Only context is very bad, because don't have a largest performance, but using Context + Hooks, is a good thing, because is very similar to redux implementation. I have a example here: https://github.com/viniarruda/spotify-project

My idea is use redux with hooks, and redux-saga to test the idea in a "largest" project, focusing in perfomance and tests, but we can use Context + hooks in native app, is a good idea too.

I had some previous problems with the scalability of context with ReactNative. It seems that the slight lower performance of context API really shows up in low spec mobile devices. Maybe context works well with simple applications with low traffic in the global state, at least that's what I got from my previous experiences.

viniarruda commented 4 years ago

What about Context instead of Redux? Would save you from having to use Redux.

Only context is very bad, because don't have a largest performance, but using Context + Hooks, is a good thing, because is very similar to redux implementation. I have a example here: https://github.com/viniarruda/spotify-project My idea is use redux with hooks, and redux-saga to test the idea in a "largest" project, focusing in perfomance and tests, but we can use Context + hooks in native app, is a good idea too.

I had some previous problems with the scalability of context with ReactNative. It seems that the slight lower performance of context API really shows up in low spec mobile devices. Maybe context works well with simple applications with low traffic in the global state, at least that's what I got from my previous experiences.

Hmm... how is a application for much users, I think the better option is use redux, but we can use context + hooks to test in web package. Don't have problem to change after too, is a open source project to test and feel free to open pr's after.

The idea is create a lot of components for design system first, after designer complet the design system. We have time to think before start the project.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.

stale[bot] commented 4 years ago

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.