Plans to fetch data using co-location within JSX
See original GitHub issueThe newly announced Next.js 12 signals a future shift by the Next team to move away from ‘data functions’ like getStaticProps
to co-locating data collection within JSX.
Builds using experimental React 18 (which is in alpha) features - like SSR and RSC - on Next 12 currently fail.
Are there plans to adapt the next-mdx-remote
package into this new model?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to fetch data in React with performance in mind
Deep dive into data fetching in React. What is performance, fundamental libraries-agnostic patterns and techniques, how react lifecycle and ...
Read more >A comprehensive guide to data fetching in React
There is a variety of ways to fetch data in React, including using the inbuilt Fetch API, Axios, and more. We'll go over...
Read more >Data Fetching Patterns for a Better User Experience - InfoQ
In a React context, the application is implemented with components, and each component may fetch its required data when it mounts. Meanwhile, a ......
Read more >React Fetch: Ultimate Guide to Fetching Data - CopyCat Blog
In this guide, you'll learn how to use Fetch to send or get data across networks and comfortably consume APIs, with examples +...
Read more >Building Scalable and Efficient React Applications Using ...
It's passed because it is the object inside the query that spreads the fragment needed by the two components. This is how Relay...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes
At this time, if you’re experiencing errors with React 18 concurrency features, check:
next-mdx-remote
is pinned at version4.0.1
12.1.4
at writing)18.0.0
proper)next.config.js
includesexperimental: { runtime: "nodejs"}
(Edge Runtime disableseval
which this library requires)If none of that works try adding this to your
next.config.js
:Or you can try
require.resolve
instead ofpath
. This is courtesy of @jakejarvisNote that, with time, this will probably break!