Update ProFreeSubcription.js#400
Open
Tanisha0708 wants to merge 1 commit into
Open
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! 😊 |
Contributor
Author
|
@vanshchauhan21 please once go through this pr |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Owner
|
Owner
hey update me , have you resolve this issue ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.