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

Research: Refactor useState() hooks to useReducer() #217

Closed
Rahulm2310 opened this issue Mar 28, 2021 · 17 comments
Closed

Research: Refactor useState() hooks to useReducer() #217

Rahulm2310 opened this issue Mar 28, 2021 · 17 comments
Assignees
Labels
Category: Outreach/Research Changes or improvements related to external research of the app. Open Source Hack

Comments

@Rahulm2310
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Currently we have a lot of separate useState() hooks in each component which makes them less maintainable. The idea is to refactor all the useState() hooks to a useReducer() hook.

Describe the solution you'd like

Research about it. Discuss benefits/disadvantages, and if to be implemented, when is the best timing for refactoring to happen.

Describe alternatives you've considered

NA

Additional context

NA

@Rahulm2310 Rahulm2310 added Category: Outreach/Research Changes or improvements related to external research of the app. Open Source Hack Status: Available Issue was approved and available to claim or abandoned for over 3 days. labels Mar 28, 2021
@jalajcodes
Copy link
Member

@sdew021 Hi there, you need to complete the compulsory task #218 before claiming other issues.

@HarshKumarChoudary
Copy link

Can I help to solve this issue?

@Aaishpra
Copy link
Member

Aaishpra commented Apr 2, 2021

@HarshKumarChoudary Are you assigned to any other issue currently. If not then I can assign you here.

@HarshKumarChoudary
Copy link

I had been assigned one task for which I had made a PR which is Ready to merge.

@Aaishpra
Copy link
Member

Aaishpra commented Apr 2, 2021

Great assigned you here then

@codesankalp codesankalp removed the Status: Available Issue was approved and available to claim or abandoned for over 3 days. label Apr 2, 2021
@HarshKumarChoudary
Copy link

I want to know where we have to describe the solution, in code area or make a new file for it

@Aaishpra
Copy link
Member

Aaishpra commented Apr 3, 2021

I guess this is a research-based issue you just have to suggest benefits/disadvantages here in the comments maybe.
Tagging @Rahulm2310 for your help.

@jalajcodes
Copy link
Member

I want to know where we have to describe the solution, in code area or make a new file for it

You dint have to code it right away, this is more of a research type issue. See if you can answer these questions.

  • why should we migrate to useReducer?
  • what are its benifits?
  • what would be the best way to implement it? (You can convert a simple component from the codebase and share with us here or create a gist)

@Rahulm2310
Copy link
Contributor Author

@HarshKumarChoudary You can also create a doc file describing the solution. You can answer the questions by @jalajcodes in the doc as well.

@mtreacy002
Copy link
Member

mtreacy002 commented Apr 3, 2021

I agree with @Rahulm2310, creating it on a doc file will means more than one contributors can propose a suggestion and the PR which solution is approved can be merged and later located easily in the repo when we're ready to implement it.

@HarshKumarChoudary
Copy link

ok

@HarshKumarChoudary
Copy link

I am ready with the doc. I have to attach that file here in comment or should merge in forked branch and create a PR?

@Rahulm2310
Copy link
Contributor Author

@HarshKumarChoudary I think you can create a PR with branch called research and post the link to the doc in PR description. This way your PR will be counted towards the Outreach/Research category which is one out of 4 categories you must complete for OSH.
cc: @mtreacy002

@mtreacy002
Copy link
Member

mtreacy002 commented Apr 3, 2021

@HarshKumarChoudary I think you can create a PR with branch called research and post the link to the doc in PR description. This way your PR will be counted towards the Outreach/Research category which is one out of 4 categories you must complete for OSH.
cc: @mtreacy002

I agree with what @Rahulm2310 has suggested.

@naveen8801
Copy link
Contributor

Hi @mtreacy002 @Rahulm2310 , can you assign this issue to me also ? :-)

@Rahulm2310
Copy link
Contributor Author

Rahulm2310 commented Apr 25, 2021

Hello @naveen8801, thanks for showing interest. Actually, @HarshKumarChoudary has researched on this and submitted a google doc with his findings which you can find in our github wiki here. This doc is open for all so feel free to add your findings to this doc so that everything related to this remains at one place. 🙂
cc: @mtreacy002

@mtreacy002
Copy link
Member

Closing this issue as @HarshKumarChoudary had proposed the suggested solution [here]#225)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Outreach/Research Changes or improvements related to external research of the app. Open Source Hack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants