react-github-profile

0.2.2 • Public • Published

GitHubProfile.jsx

Please note that this project is in progress. If you encounter bugs please report them in the issues section of the GitHub repo.

Also, please feel free to contribute! (See Contributing below)

Description

GitHubProfile is a React component designed to display a user's GitHub profile information and activity. It retrieves data from the GitHub API, including user details such as avatar, name, bio, public repositories, and followers. Additionally, it renders a GitHub activity calendar using the react-github-calendar package.

GitHubProfile Screenshot

How it works

<GitHubProfile /> accepts the following props:

  • userName: The GitHub username of the user whose profile you want to display.

Example usage

<GitHubProfile userName="tommypurcell" />

Installation

To use the GitHubProfile.jsx component in your React project, follow these steps:

  1. Install the required dependencies

    npm install axios react-github-calendar prop-types
  2. Include the component in your project directory.

  3. Import the component into your React application:

    import GitHubProfile from './GitHubProfile.jsx'
  4. Render the component in your application, passing the required props:

    <GitHubProfile
      userName="yourGitHubUsername"
    />

Usage

Props

  • userName (required): The GitHub username of the user whose profile you want to display.

Example

import React from 'react'
import GitHubProfile from './GitHubProfile.jsx'

function App() {
  return (
    <div>
      <h1>GitHub Profile</h1>
      <GitHubProfile userName="octocat" />
    </div>
  )
}

export default App

Dependencies

  • axios: Promise-based HTTP client for making requests to the GitHub API.
  • react-github-calendar: React component to display a user's GitHub activity calendar.
  • prop-types: Runtime type checking for React props.

Contributing

Thank you for your interest in contributing to the React GitHub Profile component! Follow these steps to contribute:

Steps to Contribute

  1. Review Issues
  • Check the issues section to find something to work on.
  • If you have a new idea, create a new issue and describe it.
  • Discussion: Please discuss the issue with the maintainers before starting to ensure alignment and avoid wasted effort.
  1. Clone the Project Clone the repository to your local machine.
  2. Create a New Branch Make a new branch for your changes and push your changes to this branch.
  3. Submit a Pull Request Submit a pull request to merge your branch into the main branch.
  4. Wait for Review Wait for your pull request to be reviewed and make any requested changes.
  5. Done! Once your pull request is approved and merged, you're done! Thanks for contributing. :)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i react-github-profile

Weekly Downloads

7

Version

0.2.2

License

none

Unpacked Size

67.5 kB

Total Files

24

Last publish

Collaborators

  • tommypurcell