Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MDX document #33916

Merged
merged 2 commits into from Feb 2, 2022
Merged

Update MDX document #33916

merged 2 commits into from Feb 2, 2022

Conversation

yuta-ike
Copy link
Contributor

@yuta-ike yuta-ike commented Feb 2, 2022

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
  2. Configure your MDX integration with options.providerImportSource set to that package, so either '@mdx-js/react', '@mdx-js/preact', or '@mdx-js/vue'
  3. 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
  • 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

@kodiakhq kodiakhq bot merged commit 04ca8db into vercel:canary Feb 2, 2022
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants