Skip to content
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

Passing Data Between Components: Remove hardcoded URL from Button #29032

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

Lanut1
Copy link
Contributor

@Lanut1 Lanut1 commented Oct 31, 2024

Because

The Button component in the "Functions as props" section hardcoded a URL, which reduced its reusability. This PR updates Button and App components, allowing to use different URLs.

This PR

  • Removes hardcoded URL from Button component

  • Adds URL handling via props to make Button component reusable

Issue

Closes #28736

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: React Involves the React course label Oct 31, 2024
@MaoShizhong MaoShizhong merged commit 681c604 into TheOdinProject:main Oct 31, 2024
3 checks passed
@Lanut1 Lanut1 deleted the update_button_url_prop branch November 1, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: React Involves the React course
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing Data Between Components: Inconsistency in the code example
2 participants