-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Corrections, Performance Optimizations, and Tailwind Best Practices #354
Type Corrections, Performance Optimizations, and Tailwind Best Practices #354
Conversation
- Improved performance using useCallback - Added more precise type annotations for component props - Changed component name to AnimatedGridPattern - Fix warning by using useEffect to properly observe container dimensions and prevent hydration or DOM mismatch issues. Also, used a constant for container to ensure the element exists before applying ResizeObserver.
…mproved consistency and visual clarity
- Use React.ElementType for the icon prop to fix type error - Update classname to use size-10 instead of h-10 w-10
- Removed any type for fix build error and define type for props - Update classname to use size-... from tailwind
- Update useEffect and useCallback dependencies to fix warning - Update onValueChange type to fix typing - Add value props to FolderProps type
- Reorganize Tailwind classes for better consistency - Fix Tailwind-related errors - Apply uniform class formatting across components - Improve code readability and maintainability
…known' in marquee.tsx
- Replace any with unknown - Correct negative arbitrary values in Tailwind classes
…d update Tailwind classes
… in useEffect for proper reactivity
@notREKASH is attempting to deploy a commit to the product-studio Team on Vercel. A member of the Team first needs to authorize it. |
this is awesome! thanks for going through and catching these issues |
ur welcome |
Hey, thanks for going through everything and improving the repo. Since we reviewed this quite late, I noticed that most of the issues have already been optimized and fixed. Instead of resolving all the conflicts, I opened PR #470 to implement the remaining optimizations. Thank you! Closing this in favor of that PR |
Description:
This PR focuses on several corrections and optimizations aimed at improving code quality, performance, and adherence to best practices. Below are the key changes:
Type Corrections:
any
types with more precise orunknown
types for...props
. This strengthens code reliability and reduces potential errors.Tailwind Warnings Resolution (MagicUI):
Optimization with
useCallback
:useCallback
to the appropriate functions to avoid unnecessary re-renders and improve performance.useCallback
anduseEffect
to resolve warnings related to React hooks.Testing:
Note: