static-tweets
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

React Static Tweets

static-tweets

Utilities for fetching and manipulating tweet ASTs.

NPM Build Status Prettier Code Formatting

Install

npm install static-tweets

This package is compatible with Node.js.

Usage

import [ fetchTweetAst } from 'static-tweets'

const tweetId = '1358199505280262150'
const tweetAst = await fetchTweetAst(tweetId)

// tweetAst is a JSON representation of this tweet's contents
// which `react-static-tweets` can use to render
}

Client-Side

This package is only meant to be used on the server. If you want to render tweets dynamically on the client-side, then you'll need to wrap this package in an API route.

Docs

See the main docs.

License

MIT © Travis Fischer

Support my OSS work by following me on twitter twitter

/static-tweets/

    Package Sidebar

    Install

    npm i static-tweets

    Weekly Downloads

    945

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    242 kB

    Total Files

    41

    Last publish

    Collaborators

    • fisch0920