function useMDXComponents(components) {
  const contextComponents = useContext(MDXContext)

  // Custom merge via a function prop
  if (typeof components === 'function') {
    return components(contextComponents)
  }

  return {...contextComponents, ...components}
}
Get current components from the MDX Context.

@param {Readonly<MDXComponents> | MergeComponents | null | undefined} [components]
  Additional components to use or a function that creates them (optional).
@returns {MDXComponents}
  Current components.