Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/transitive-bullshit/react-fake-tweet

React renderer for tweets.
https://github.com/transitive-bullshit/react-fake-tweet

fake react tweet twitter

Last synced: 3 months ago
JSON representation

React renderer for tweets.

Awesome Lists containing this project

README

        

# react-fake-tweet

> React renderer for tweets.

[![NPM](https://img.shields.io/npm/v/react-fake-tweet.svg)](https://www.npmjs.com/package/react-fake-tweet) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)


Example fake tweet

This project is a fork of [fake-tweet](https://github.com/lluiscamino/fake-tweet) by [Lluís Camino](https://github.com/lluiscamino) with the following improvements:

- Uses CSS modules to not pollute CSS namespace
- Allows you to override className, style, etc on root element
- Smaller bundle size via microbundle
- Fixes some style issues
- Used in production by [twitter-search.io](https://twitter-search.io)

## Install

```bash
npm install --save react-fake-tweet
```

## Usage

```jsx
import React, { Component } from 'react'

import { Tweet } from 'react-fake-tweet'
import 'react-fake-tweet/dist/index.css'

const tweet = {
/* ... */
}

class Example extends Component {
render() {
return (

)
}
}
```

## Related

- [react-tweet-embed](https://github.com/capaj/react-tweet-embed) - Embeds a tweet using Twitter's official embedding SDK.
- Significantly more accurate and robust
- Slightly more heavy-weight
- No way that I'm aware of to fake the resulting tweet's content

## License

MIT © [transitive-bullshit](https://github.com/transitive-bullshit)

Support my OSS work by following me on twitter twitter