0.1.5 • Published 1 year ago

@imdbsd/tiktok-embed v0.1.5

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

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-embed

Usage

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
propstyperequired/optionaldescription
urlstringrequiredTiktok content url
  • useTiktokOembed

Props

propstyperequired/optionaldescription
urlstringrequiredTiktok content url

Return

returntypedescription
loadingbooleanTiktok content url
dataTiktokOembedResponse / nullTiktok oembed return type
errorunknownError Response
0.1.5

1 year ago

0.1.4

1 year ago

0.0.1-alpha.20

1 year ago

0.0.1-alpha.19

1 year ago

0.0.1-alpha.0

1 year ago