Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[PR] Fix for #20 - Search Bug #21

Merged
merged 6 commits into from
Jan 27, 2024
Merged

[PR] Fix for #20 - Search Bug #21

merged 6 commits into from
Jan 27, 2024

Conversation

Nyumat
Copy link
Owner

@Nyumat Nyumat commented Jan 27, 2024

Changes:

  • Added the first test useSearch.test.tsx which will test the useSearch.tsx hook's behaviors
    • Yes, more tests will be coming soon. Just wanted to setup the environment in this first iteration
  • Fixed Back Button Bug in Search does not work after return to search results from a selcted title #20
    • Issue was the show flag which determines whether or not to render the children containing a race condition)
    • Fix was lifting the state, utilizing React's useCallback() hook and memoizing re-renders.
  • Added PROD url to link on "NyumatFlix" in the README.md
  • Removed unnecessary side-effects to make the state more atomic and obvious
  • Cleanup function in useSearch for component unmount

TODO:

  • Add a global state management solution
  • Currently considering RTK, XState, and Zustand
  • Finish the rest of the hooks/ tests

@Nyumat Nyumat linked an issue Jan 27, 2024 that may be closed by this pull request
@Nyumat Nyumat merged commit 5a2f026 into main Jan 27, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search does not work after return to search results from a selcted title
1 participant