04ca8dbff3
This PR added about `providerImportSource` option, which we need to specify in `next.config.js` to use `MDXProvider`. Related mdx documents: https://mdxjs.com/docs/using-mdx/#mdx-provider > To solve this, a context can be used in React, Preact, and Vue. Context provides a way to pass data through the component tree without having to pass props down manually at every level. Set it up like so: > 1. Install either @mdx-js/react, @mdx-js/preact, or @mdx-js/vue, depending on what framework you’re using > 1. Configure your MDX integration with options.providerImportSource set to that package, so either '@mdx-js/react', '@mdx-js/preact', or '@mdx-js/vue' > 1. Import MDXProvider from that package. Use it to wrap your top-most MDX content component and pass it your components instead: Because my English skills are not high, feel free to improve my sentences. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [x] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com> |
||
---|---|---|
.. | ||
amp-support | ||
automatic-static-optimization.md | ||
codemods.md | ||
compiler.md | ||
custom-app.md | ||
custom-document.md | ||
custom-error-page.md | ||
custom-server.md | ||
customizing-babel-config.md | ||
customizing-postcss-config.md | ||
debugging.md | ||
dynamic-import.md | ||
i18n-routing.md | ||
measuring-performance.md | ||
module-path-aliases.md | ||
multi-zones.md | ||
output-file-tracing.md | ||
preview-mode.md | ||
react-18.md | ||
security-headers.md | ||
source-maps.md | ||
src-directory.md | ||
static-html-export.md | ||
using-mdx.md |