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.
- Host: GitHub
- URL: https://github.com/anayet6863/productheaven
- Owner: Anayet6863
- Created: 2024-11-14T20:11:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-08T06:08:34.000Z (10 months ago)
- Last Synced: 2025-01-30T21:15:03.664Z (10 months ago)
- Topics: html5, javascript, react, taiwlindcss
- Language: JavaScript
- Homepage: https://anayet-product-heaven.netlify.app
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.