Skip to content

Update ProFreeSubcription.js#400

Open
Tanisha0708 wants to merge 1 commit into
vanshchauhan21:mainfrom
Tanisha0708:main
Open

Update ProFreeSubcription.js#400
Tanisha0708 wants to merge 1 commit into
vanshchauhan21:mainfrom
Tanisha0708:main

Conversation

@Tanisha0708

Copy link
Copy Markdown
Contributor

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.

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.
@vercel

vercel Bot commented Nov 2, 2024

Copy link
Copy Markdown

@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.

@github-actions

github-actions Bot commented Nov 2, 2024

Copy link
Copy Markdown

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! 😊

@Tanisha0708

Copy link
Copy Markdown
Contributor Author

@vanshchauhan21 please once go through this pr

@vercel

vercel Bot commented Nov 3, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
crypto-tracker ❌ Failed (Inspect) Nov 3, 2024 3:06pm

@vanshchauhan21

Copy link
Copy Markdown
Owner

@vanshchauhan21 please once go through this pr

Screenshot_20241103-114630
Hey please resolve this issue

@vanshchauhan21

Copy link
Copy Markdown
Owner

@vanshchauhan21 please once go through this pr

hey update me , have you resolve this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants