setData

Type: object|function
Setup the content to be rendered into the card.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={{
      title: 'SENTRY ACTIVATED'
    }}
  />
)

The data provided will be merged with the original data extracted.

When an object is passed to setData, the custom data provided will merged with the original data.
If you need a more granular control, you can pass a function.
In that case, the function receives the data fetched internally as the first argument, and you need to return the data you want to mount.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={data => ({
      ...data,
      title: 'SENTRY ACTIVATED'
    }})
  />
)

Skip internal fetch providing a function as setData.

setData

Type: object|function
Setup the content to be rendered into the card.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={{
      title: 'SENTRY ACTIVATED'
    }}
  />
)

The data provided will be merged with the original data extracted.

When an object is passed to setData, the custom data provided will merged with the original data.
If you need a more granular control, you can pass a function.
In that case, the function receives the data fetched internally as the first argument, and you need to return the data you want to mount.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={data => ({
      ...data,
      title: 'SENTRY ACTIVATED'
    }})
  />
)

Skip internal fetch providing a function as setData.

By using this website you agree to ourprivacy.