0.1.5 • Published 3 years ago
@imdbsd/tiktok-embed v0.1.5
Tiktok Embed
React component for embed tiktok video. Created based on tiktok oembed specification.
Instalation
$ yarn add @imdbsd/tiktok-embed
or
$ npm install @imdbsd/tiktok-embedUsage
Using TiktokEmbed component
// App.tsx
import {TiktokEmbed} from '@imdbsd/tiktok-embed';
const App = () => {
...
return (
...
<TiktokEmbed url="https://www.tiktok.com/@catslums/video/7201281217864535302" />
...
)
}Using useTiktokOmbed hooks
import {useTiktokOembed} from '@imdbsd/tiktok-embed'
const App = () => {
const url = "https://www.tiktok.com/@catslums/video/7201281217864535302"
const {loading, data, error} = useTiktokOembed({ url });
...
}Props / Return
- TiktokEmbed
| props | type | required/optional | description |
|---|---|---|---|
| url | string | required | Tiktok content url |
- useTiktokOembed
Props
| props | type | required/optional | description |
|---|---|---|---|
| url | string | required | Tiktok content url |
Return
| return | type | description |
|---|---|---|
| loading | boolean | Tiktok content url |
| data | TiktokOembedResponse / null | Tiktok oembed return type |
| error | unknown | Error Response |
0.1.5
3 years ago
0.1.4
3 years ago
0.0.1-alpha.20
3 years ago
0.0.1-alpha.19
3 years ago
0.0.1-alpha.0
3 years ago