Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Modernize the application & Performance tweaks #135

Open
wants to merge 136 commits into
base: master
Choose a base branch
from

Conversation

khaledosman
Copy link

@khaledosman khaledosman commented Apr 8, 2019

The repo seems to be a bit out of date and isn't using best practices when it comes to performance for React applications, so this article might be unrealistic for 2019 https://medium.com/free-code-camp/a-realworld-comparison-of-front-end-frameworks-with-benchmarks-2019-update-4be0d3c78075. This PR aims to change that

  • Used the newest versions of React and other dependencies
  • Migrate away from deprecated library react-router-redux to connected-react-router
  • Use PureComponents and React.memo for functional components for better performance
  • Migrate away from deprecated lifeCycleHooks like componentWIllUpdate, componentWillReceiveProps & componentWillMount
  • lazyload & codesplit non-default routes with React.lazy & React.Suspense

@khaledosman khaledosman changed the title Modernize the application Modernize the application & Performance tweaks Apr 9, 2019
@sangdth
Copy link

sangdth commented May 6, 2019

I have the same feeling and looking forward to this PR.

@khaledosman
Copy link
Author

Any updates?

@klamping
Copy link

FYI, using your fork, logging out gives me this error:
image

@khaledosman
Copy link
Author

@klamping I was able to reproduce the issue, it should be fixed now.

@khaledosman
Copy link
Author

Is anyone maintaining this app anymore? I would be happy to maintain it myself

@helderscrolls
Copy link

@khaledosman One small thing I found, currentUser.image is broken if you define no image, isn't there a way already coded on the API to recover the profile.image smiley face and use it instead of displaying the alt message ?

@khaledosman
Copy link
Author

@helderscrolls Thanks, I'm not sure where that broke as I didn't change any API related logic, I'll look into it later when I have the time.

@helderscrolls
Copy link

@khaledosman I think it’s a issue that comes from the original Build, the only way I’ve found so far is to hard code the URL on the front-end, on the Header and the Comment preview that way even if currentUser.image is undefined it displays the smiley face

leosuncin and others added 30 commits July 25, 2021 22:58
Help to recreate the store inside the tests.
Add custom render function, wrap the providers.
Move all authentication state to it.

BREAKING CHANGE removed loginPageUnloaded and registerPageUnloaded
Unit test the reducer and selectors
Both Login and Register share almost all the UI, so, to reduce duplicate code.

BREAKING CHANGE: remove Login and Register components and use only one screen
Now these features are under auth slice.

BREAKING CHANGE: remove settingsPageUnloaded
Add a slice to manage the comments.
Fix redirect handling on failed login
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants