score:1

Accepted answer
const serializers = {
  types: {
    code: props => (
      <pre data-language={props.node.language}>
        <code>{props.node.code}</code>
      </pre>
    )
  }
}

// ...

<BlockContent                
    blocks={body}
    imageOptions={{fit: 'max'}}
    {...client.config()}
    {...code}
    serializers={serializers}
/>

Related Query

More Query from same tag