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] Improve architecture #8

Closed
5 tasks done
LauraBeatris opened this issue Dec 28, 2020 · 0 comments · Fixed by #14
Closed
5 tasks done

[Refactor] Improve architecture #8

LauraBeatris opened this issue Dec 28, 2020 · 0 comments · Fixed by #14
Assignees
Labels
enhancement New feature or request

Comments

@LauraBeatris
Copy link
Owner

LauraBeatris commented Dec 28, 2020

Requested Changes

  • Break the page into more components (Follow the "Show, don't tell" principle)
  • Define type definitions on separate files, such as types.ts
  • Use the https://github.com/soyguijarro/react-storage-hooks package to store values on local storage, since it deals with the cases where local storage is inactive on the browser.
  • Use absolute imports with TS paths
  • Use named exports to improve auto-import and nomenclature refactors

Motivation

The current architecture doesn't have a good approach regarding the following points:

  • Componentization
  • Location of type definitions
  • Use of local storage without verifying its existing

And regarding code style:

Tasks

  • Improve componentization
  • Move type definitions to separate files
  • Use local storage with hooks packages to avoid accessing it directly
  • Use absolute import paths instead of relative ones with multiple levels '../../'
  • Remove React.FC and explicitly set the type for the component props. Refer to Remove React.FC from Typescript template facebook/create-react-app#8177 in order to see the downsides of using it
@LauraBeatris LauraBeatris added the enhancement New feature or request label Dec 28, 2020
@LauraBeatris LauraBeatris self-assigned this Jan 7, 2021
@LauraBeatris LauraBeatris changed the title [Refactor] Improve archicture [Refactor] Improve architecture Jan 7, 2021
@LauraBeatris LauraBeatris linked a pull request Jan 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant