Skip to content

Path aliases and User Provider#25

Open
evengene wants to merge 1 commit intonathanrydel:mainfrom
evengene:24-create-path-aliases
Open

Path aliases and User Provider#25
evengene wants to merge 1 commit intonathanrydel:mainfrom
evengene:24-create-path-aliases

Conversation

@evengene
Copy link
Copy Markdown
Contributor

Solves #24 but while working on that, decided to separate User Provider logic.

The current PR is large but it will help to work with the user in the future.
What's implemented:

Paths

  • create a craco.config file and prepare structure for further imports (Create React App Configuration Override for paths aliases) - did not work otherwise.
    The project can be further structured to have pages and components separately in src folder.

User Provider

  • Refactor App.js - it is now easy to read
  • Create a separate folder for UserProvider, with types and correct structure, keeping the same logic/comments from App.js to refactor further when needed,
  • User Provider consolidation - remove prop drilling from other components, separate logic.
  • Create MockUserProvider to enable testing demoUser

Other files

  • Changed types in useLocalStorage - this would need further refactor, put the types as-is for now,
  • Add correct types to some files connected to UserProvider

@evengene
Copy link
Copy Markdown
Contributor Author

@nathanrydel please let me know if we can use this PR as-is or if you need me to create any additional issues.
I did not intent to refactor this much initially. 🙈 But to solve all the errors I had - this is the scope I came to.

While doing that, more ideas for tasks:

  • Set linter settings to use potentially (while the project is small relatively - it will be easier to lint at this stage rather than later),
  • Implement Redux/RTX for state and requests handling,
  • Develop design

@nathanrydel nathanrydel added the -review Pull Requests in the Review Stage label Apr 5, 2024
@evengene evengene force-pushed the 24-create-path-aliases branch from 0dc32c4 to 757954d Compare April 10, 2024 01:22
@evengene evengene force-pushed the 24-create-path-aliases branch from 757954d to 1875b4c Compare April 10, 2024 01:35
@evengene
Copy link
Copy Markdown
Contributor Author

the branch is up-to-date with the main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-review Pull Requests in the Review Stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants