-
Notifications
You must be signed in to change notification settings - Fork 48
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
Update ProFreeSubcription.js #400
base: main
Are you sure you want to change the base?
Conversation
here are the some changes did to improve efficiency, readability and maintanability Moved pricingPlans Outside the Component: Why: Declaring pricingPlans inside the component redefines it every time the component renders, which is unnecessary and can impact performance slightly. Improvement: Moving pricingPlans outside the ProFreeSubscription component ensures it’s only defined once. Fixed Typo in Component Name: Why: Consistent and correct naming is crucial for code readability and avoiding errors. Improvement: Renamed ProFreeSubcription to ProFreeSubscription to correct the typo. Added PropTypes for Type-Checking: Why: PropTypes help with validating props, ensuring the right data types are passed to components, which is especially helpful in larger codebases. Improvement: Added PropTypes to ProFreeSubscription and PriceCard, defining expected types for props and default values. Conditional Styling with CSS Class: Why: Instead of passing isHighlighted just to apply styling, using a conditional CSS class improves readability and modularity. Improvement: Added a highlighted CSS class to the PriceCard component to style highlighted cards (e.g., the PRO plan) in ProFreeSubscription.css. Improved CSS Modularity: Why: Styling based on class names improves modularity, and moving styles out of inline logic is cleaner. Improvement: Defined .highlighted and .pricing-container in the CSS file for consistent, reusable styling.
@Tanisha0708 is attempting to deploy a commit to the vanshchauhan21's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
@vanshchauhan21 please once go through this pr |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
hey update me , have you resolve this issue ? |
here are the some changes did to improve efficiency, readability and maintanability Moved pricingPlans Outside the Component:
Why: Declaring pricingPlans inside the component redefines it every time the component renders, which is unnecessary and can impact performance slightly. Improvement: Moving pricingPlans outside the ProFreeSubscription component ensures it’s only defined once. Fixed Typo in Component Name:
Why: Consistent and correct naming is crucial for code readability and avoiding errors. Improvement: Renamed ProFreeSubcription to ProFreeSubscription to correct the typo. Added PropTypes for Type-Checking:
Why: PropTypes help with validating props, ensuring the right data types are passed to components, which is especially helpful in larger codebases. Improvement: Added PropTypes to ProFreeSubscription and PriceCard, defining expected types for props and default values. Conditional Styling with CSS Class:
Why: Instead of passing isHighlighted just to apply styling, using a conditional CSS class improves readability and modularity. Improvement: Added a highlighted CSS class to the PriceCard component to style highlighted cards (e.g., the PRO plan) in ProFreeSubscription.css. Improved CSS Modularity:
Why: Styling based on class names improves modularity, and moving styles out of inline logic is cleaner.
Improvement: Defined .highlighted and .pricing-container in the CSS file for consistent, reusable styling.