Skip to content

docs: Make code samples more complete#998

Merged
mrousavy merged 6 commits intomainfrom
docs/feedback
Oct 28, 2025
Merged

docs: Make code samples more complete#998
mrousavy merged 6 commits intomainfrom
docs/feedback

Conversation

@mrousavy
Copy link
Owner

@mrousavy mrousavy commented Oct 27, 2025

Some feedback I got from watching Oscar Franco try out Nitro Modules in

My code samples weren't always complete - sometimes they didn't contain the HybridObject<P> Platform args, or sometimes they didn't include imports.

So this PR improves that for many code samples:

- interface Math extends HybridObject {
+ interface Math extends HybridObject<{ … }> {
+ import { type HybridObject } from 'react-native-nitro-modules'

interface Math extends HybridObject<{ … }> {

@vercel
Copy link

vercel bot commented Oct 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nitro-docs Ready Ready Preview Comment Oct 28, 2025 11:59am

@mrousavy mrousavy changed the title docs: Add HybridObject<{ ... }> platforms to docs docs: Make code samples more complete Oct 28, 2025
@mrousavy mrousavy merged commit 389c028 into main Oct 28, 2025
5 of 6 checks passed
@vilindberg
Copy link

I need to start a YouTube-channel 😉 : #320

@mrousavy
Copy link
Owner Author

hahaha yea valid - I guess at least in the landing pages we need the imports.

Everywhere else it's incomplete code snippets

@DaveyEke
Copy link

Phew, thanks for adding -- I was confused the first day I tried making my own nitro modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants