An open API service indexing awesome lists of open source software.

https://github.com/anayet6863/productheaven

Pruduct heaven is a simple website implement by using React.
https://github.com/anayet6863/productheaven

html5 javascript react taiwlindcss

Last synced: 8 months ago
JSON representation

Pruduct heaven is a simple website implement by using React.

Awesome Lists containing this project

README

          

# Project Name: Product Heaven

### Technology
- Html
- Tailwind css
- Java Script
- React

## Documents
- Website live link:
- Website documents link: https://github.com/Anayet6863/ProductHeaven
## Questin and Answer?
- Questin: Explain the benefits of creating a custom hook in this context.
Answer:
### A custom hook improves reusability and keeps components clean by centralizing search and filtering logic. It makes the code easier to read, maintain, and test in isolation.
- Questin:Describe in a few sentences your approach to managing component re-renders in this assessment, particularly for ProductList.
### Answer: To manage re-renders in ProductList, I used useEffect with specific dependencies, ensuring updates only occur when necessary (like on changes to search or allProducts). I avoided conditional hooks to prevent re-render loops. This approach minimized unnecessary renders, keeping performance optimized.
- Questin: Explain how you would optimize this component if it were part of a larger application, focusing on minimizing re-renders and improving performance.
### Answer: To optimize a React component, I'd use React.memo to avoid unnecessary re-renders, useCallback for stable function references, and virtualize lists with react-window to limit rendered items. For shared state, selectively using context or Redux can further reduce redundant renders.