Skip to content

Example application that displays Github issues and content using React, Bulma, Showdown, and Font Awesome

Notifications You must be signed in to change notification settings

atomize/github-issues-react-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React + Github Issues API v3

An example application that retrieves the issues from a particular Github repository and displays them. Includes pagination and some light filtering functionality. Clicking on an issue reveals the body with Gihub markdown parsed to display as HTML in the preview box. This particular repository is structured like a standalone React app, but it only consists of one main component, GithubIssues.jsx, that takes two props: 'user' & repo'. All of the other components are rendered as children to Changing the 'user' and 'repo' props of the GithubIssues component will initally render the issues for that user/repository accordingly. Clicking the left icon in the nav header opens a modal where you can enter a new user/repository to load dynamically.

View Demo

Built With

Example usage in code:

index.html

<!DOCTYPE html>
<html class="has-navbar-fixed-bottom has-navbar-fixed-top">
  <head>
    <meta charset="utf-8" />
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Github Issues Example"
    />
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <title>Github Issues</title>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>

index.js

import ReactDOM from 'react-dom';
import './css/index.css';
import App from './app/App';
import * as serviceWorker from './utils/serviceWorker';

ReactDOM.render(<App />, document.getElementById('root'));

serviceWorker.register();

App.js

import React from 'react';
import GithubIssues from '../components/GithubIssues.jsx'
function App() {
return (
 <>
 <div className="App">   
   <GithubIssues  user="facebook" repo="react" />
 </div>
</>
);
}

export default App;

Getting Started

To get a local copy up and running follow these simple steps.

Installation

  1. Clone the github-issues-react-example
git clone https:://github.com/atomize/github-issues-react-example.git
  1. Install dependencies
yarn install

Development:

  1. Start the development server
yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

  1. Run interactive tests
yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Production:

  1. Build bundle for production
yarn build

License

Distributed under the MIT License.

Contact

Berti - jonathan.berti@gmail.com

Project Link: https://github.com/atomize/github-issues-react-example/

About

Example application that displays Github issues and content using React, Bulma, Showdown, and Font Awesome

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published