Platform React App#30
Conversation
defd8ab to
b19fdd3
Compare
|
Hey @lkatmadas - Thanks a lot for your effort dude! :) I've checked your assignment and I have a couple of questions for you:
Again thanks for your submission and looking forward to your answers! |
There was a problem hiding this comment.
Oh my bad and no excuse here! Somehow missed this one and pushed it, sorry.
| const [isModalDismissed, setIsModalDismissed] = useState(false) | ||
| const { data: fallbackCat = null, isLoading: isFetchingFallbackCat } = useCatImage(selectedCatId) | ||
|
|
||
| const debouncedHoverRef = useRef( |
There was a problem hiding this comment.
Could you describe on why you've decided to use a ref to achieve this?
There was a problem hiding this comment.
I used a ref to store the debounced hover handler so the function stays stable across renders and doesn’t get recreated on every update. This makes sure the debounce logic works as expected and helps avoid unnecessary API calls—for example, from handleCardHover. It also lets me clean up on unmount using .cancel(), which helps prevent any side effects after the component is removed.
| "lint:fix": "eslint . --fix", | ||
| "preview": "vite preview", | ||
| "test": "vitest", | ||
| "test:ui": "vitest --ui", |
There was a problem hiding this comment.
This doesn't seem to work for me. Wondering if it's needed? 🤔
There was a problem hiding this comment.
I added @vitest/ui intending to try out the UI interface, but ended up focusing more on the UI and accessibility work. It's an optional user interface for Vitest that I thought might be a good idea to have, but it is not currently used. Happy to remove it if needed.
|
Hello @gpositive, |
- About the 2 different lock files: - About "Query data cannot be undefined. Affected query key: ["cats","is-favourited","dn9"] We need to make sure the queryFn never returns undefined. Something like this will probably fix the issue: - If I had some more time, what would I have done differently? General technical improvements:
For UI/UX:
Testing:
|
No description provided.