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 be merged with the original data.
If you need a more granular control, you can pass a <function>.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={() => ({
      title: 'SENTRY ACTIVATED',
      description: 'Are humans worth it?',
      image: { url: 'https://i.imgur.com/1FyFxlk.jpg' },
      publisher: 'HAL 9000',
      url: 'http://thehal9000.com'
    })}
  />
)
Skip internal fetch providing a function as setData.
In that case, the function should be return all the data necessary to be mounted.

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 be merged with the original data.
If you need a more granular control, you can pass a <function>.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://instagram.com/p/Bt6EMQhHHIr/'
    setData={() => ({
      title: 'SENTRY ACTIVATED',
      description: 'Are humans worth it?',
      image: { url: 'https://i.imgur.com/1FyFxlk.jpg' },
      publisher: 'HAL 9000',
      url: 'http://thehal9000.com'
    })}
  />
)
Skip internal fetch providing a function as setData.
In that case, the function should be return all the data necessary to be mounted.