2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ReactでTwitterタイムラインを埋め込む方法

Posted at

react-twitter-widgetsをインストール

npm install react-twitter-widgets

Reactでの使い方

hello.jsx
import React from 'react';
import { Timeline } from 'react-twitter-widgets';

const HelloPage = () => {
  return (
      <main>
        <Timeline
          dataSource={{
            sourceType: 'profile',
            screenName: 'maiamea' // アカウント名
          }}
          options={{
            height: '800'
          }}
        />
      </main>
  )
}

export default HelloPage

結果

以下のように表示される。
スクリーンショット 2021-10-30 19.39.58.png

参考サイト

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?