-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Nextra 5 #3316
Comments
To start a discussion: What if Nextra really focused in on its core value props, removing everything out of core that causes maintenance burden? I've built a site for Triplex using Nextra@2 and I've found I've been fighting against Nextra more than working with it. The main parts of Nextra that I've found valuable are:
I would include Search in there but unfortunately there isn't an easy way to replace the UI with something bespoke, so I had to re-implement it. Layouts aren't there yet but would be a natural fit when moving to the app router! So rather than having a single inflection point with every layout decision in a single file (app.tsx), or defining something custom (meta.tsx) it would just be native layout routes via app router. With a new major version and a focus on app router there's an opportunity to really focus in on what core should be. My take is if Nextra focused on the plumbing/infra, MDX/Meta/Search/Layouts (powered by app router), pushing everything UI related outside of core it would reduce the maintenance cost and then let folks who want complete ownership of the UI layer build up from a solid foundation. Focusing on that minimal surface area, and then really narrowing in on an expressive API that remain fast for great local dev would be fantastic IMO. |
what do you mean to remove?
you can use any Search with
this is already possible with Nextra 4 prerelease #2600 Your suggestions are more applicable to Nextra 4 and not Nextra 5, I would suggest first trying it as I described in #2600 (comment) |
That the core of Nextra is MDX + meta + search systems to collect information about all the fs routes/content available, everything else is extra that folks would ideally opt in to instead of opt out of to keep bundle sizes lean. This would have the added benefit for maintainers in focusing on what is community or core driven. YMMV if most folks use Nextra as-is with themes then I might be in the minority, but if all Nextra was just MDX + meta + search, no UI, while ensuring a great local DX for fast HMR with MDX/meta, it'd be all I need to productively build and ship.
Exactly. I don't want to use any pre-built Nextra theme, desiring full control, so I've written my own. One friction point of that is search isn't apart of core but only in the docs theme. My take is: it belongs in core just as the meta infra does.
Ah fair enough, thanks! My comments might have been better placed there then TBH apologies :-). I'll start using it and comment with feedback. |
btw Search in v4 is removed from core and replaced by Pagefind which indexes remote content as well |
Just curious if these are being replaced by something better, I'd love to learn about it. Maybe React Compiler will handle memoization, but context? |
I meant to replace |
I see, looking forward to following the progress on Nextra 4 & 5. Thanks! |
Stay tuned! The blog post about Nextra 4 is now finished and will be published later this week. 😜 |
mdxjs-rs
parsermemo
,useCallback
,useMemo
andforwardRef
,useContext
,Context.Provider
The text was updated successfully, but these errors were encountered: