Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jenbuzz/react-hackernews

Add a HackerNews feed to your React app.
https://github.com/jenbuzz/react-hackernews

hackernews hackernews-client newsfeed react-component

Last synced: 4 days ago
JSON representation

Add a HackerNews feed to your React app.

Awesome Lists containing this project

README

        

# react-hackernews

Add a HackerNews feed to your React app.

## Installation

```bash
$ npm install react-hackernews
```

or

```
$ yarn add react-hackernews
```

## Usage

```javascript
import React from 'react';
import HackerNews from 'react-hackernews';

const MyComponent = () => ;
```

### Options

| Name | Allowed values | Default |
| ----- | ------------------------------------------ | ------- |
| type | 'new', 'top', 'best', 'ask', 'show', 'job' | 'top' |
| limit | number | 10 |

```javascript
import React from 'react';
import HackerNews from 'react-hackernews';

const MyComponent = () => ;
```

### Styling

The feed is wrapped in a container with the classname "react-hackernews".

## License

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)