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

Refactor Frontend Code #13

Open
NickEngmann opened this issue May 18, 2019 · 3 comments
Open

Refactor Frontend Code #13

NickEngmann opened this issue May 18, 2019 · 3 comments
Assignees
Labels
frontend React related help wanted Extra attention is needed

Comments

@NickEngmann
Copy link
Collaborator

Even though we just started the frontend code could use some gentle refactoring to follow React best practices. As well as some lint checking

https://github.com/yannickcr/eslint-plugin-react

@NickEngmann NickEngmann added the help wanted Extra attention is needed label May 24, 2019
@NickEngmann NickEngmann self-assigned this May 24, 2019
@NickEngmann NickEngmann added the frontend React related label May 24, 2019
@martinpsz
Copy link

@nicolij Looking to help you with this task. Can you be more specific as to what you'd like to accomplish with the refactoring? Here are some things that caught my eye:

  1. We have some class components that could be converted to functional components. (Ex. MapContainer.js)

  2. Could we benefit from centralizing state? I notice there are a lot of class components each of which are managing state, which I understand could get unwieldy and tough to manage in the future.

Anyway, I am happy to work with you on this issue but it would be helpful if we could put together a checklist I could work on.

Thanks!

@nikolajbaer
Copy link
Member

@martinpsz

Thanks for checking in! You are pretty much spot on in terms of the updates. My biggest thing was adding redux to get centralized state management. I was more focused on the backend setup early on, but I have been doing some vue.js as of late, and saw that benefit in managing state similar to redux.

The best starting point would maybe be to create a state object that gets initialized with the user's login status.

The class components also would make sense, although I would leave that up to you. Sorry I wasn't at the last two collab nights, my family has been sick. I am available on slack if you have further questions!

@martinpsz
Copy link

martinpsz commented Jan 30, 2020

@nikolajbaer I'll be honest, I am not that strong on Redux. I have been devoting more time to learning Context + Hooks. I am not sure if that would be as good, performance wise, as Redux in this use case.

I will do my best to be at the Jam next Tuesday if you are going to be there. Maybe we can talk about this more in person? I look forward to working with you on this...I think it is a great learning opportunity as I develop my knowledge of React.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend React related help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants