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: 17 days ago
JSON representation
Add a HackerNews feed to your React app.
- Host: GitHub
- URL: https://github.com/jenbuzz/react-hackernews
- Owner: jenbuzz
- Created: 2020-05-21T10:37:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-07T12:56:07.000Z (about 3 years ago)
- Last Synced: 2025-03-04T09:14:29.816Z (8 months ago)
- Topics: hackernews, hackernews-client, newsfeed, react-component
- Language: JavaScript
- Homepage:
- Size: 500 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)