Skip to content

Made minor update to the quickstart guide for React and Next.js #949

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

Merged
merged 1 commit into from
Aug 20, 2025

Conversation

Aviatorscode2
Copy link
Contributor

@Aviatorscode2 Aviatorscode2 commented Aug 18, 2025

@jainpawan21, kindly review and merge this.

Summary by CodeRabbit

  • Documentation
    • Next.js quickstart updated to highlight integrating the Inbox with the App Router; description clarified.
    • React quickstart now demonstrates integration with React Router, including a basic routing example.
    • Examples standardized to use the NovuInbox component name.
    • Installation instructions simplified to require only @novu/react.
    • Quickstart code templates aligned with the new naming and Next.js App Router layout.

Copy link

netlify bot commented Aug 18, 2025

Deploy Preview for docs-novu ready!

Name Link
🔨 Latest commit 163364a
🔍 Latest deploy log https://app.netlify.com/projects/docs-novu/deploys/68a30e7f3dc5fd0008049ece
😎 Deploy Preview https://deploy-preview-949--docs-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented Aug 18, 2025

Walkthrough

Documentation updates refine Next.js and React quickstarts for integrating the Novu Inbox. The React guide renames the sample component and adjusts routing examples. Corresponding code templates are updated: Next.js template target path change; React template renames the exported component and updates React Router usage.

Changes

Cohort / File(s) Summary
Docs — Next.js Quickstart
content/docs/platform/quickstart/nextjs.mdx
Updated description to specify integrating Novu Inbox with Next.js App Router; no other content changes.
Docs — React Quickstart
content/docs/platform/quickstart/react.mdx
Revised to integrate Novu Inbox with React Router; removed react-router-dom from install snippet; renamed example component/file from NotificationCenter/components/notification-center.tsx to NovuInbox/components/novu-inbox.tsx; updated imports/usages and added Home component/routing snippet.
Quickstart Code Templates
src/components/quickstart/inbox-code.tsx
Updated nextjs-inbox template target from components/inbox.tsx to app/layout.tsx; updated react-inbox template to target src/components/novu-inbox.tsx, rename exported component to NovuInbox, and switch to useNavigate import from react-router.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant App
  participant NovuInbox
  participant Router

  User->>App: Open app
  App->>NovuInbox: Render inbox component
  NovuInbox->>Router: useNavigate(...) on interactions
  Router-->>App: Route to /inbox or back
  App-->>User: Updated view
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jainpawan21
  • DianaHackmamba

Poem

A twitch of whiskers, nib of pen,
I rename the Inbox once again.
From Center old to Novu new,
The routes now hop and swiftly cue.
Docs aligned, templates in sync—
Thump-thump! Ship it, don’t overthink. 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch quickstart-quick-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/components/quickstart/inbox-code.tsx (1)

129-129: Consider adding React import for consistency with other templates.

While modern React doesn't strictly require importing React for JSX, some of the other templates in this file (like the Remix template on line 158) include it. For consistency across templates, consider adding the React import.

-    code: `import { Inbox } from '@novu/react';
+    code: `import React from 'react';
+import { Inbox } from '@novu/react';
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e3025bc and 163364a.

📒 Files selected for processing (3)
  • content/docs/platform/quickstart/nextjs.mdx (1 hunks)
  • content/docs/platform/quickstart/react.mdx (3 hunks)
  • src/components/quickstart/inbox-code.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Redirect rules - docs-novu
  • GitHub Check: Header rules - docs-novu
  • GitHub Check: Pages changed - docs-novu
  • GitHub Check: Build and Lint
🔇 Additional comments (11)
content/docs/platform/quickstart/nextjs.mdx (1)

4-4: LGTM! Description improved for clarity.

The updated description is more specific and informative, clearly mentioning the App Router integration which aligns with modern Next.js best practices.

src/components/quickstart/inbox-code.tsx (3)

45-45: LGTM! File path updated to match Next.js App Router structure.

The change from components/inbox.tsx to app/layout.tsx correctly reflects the App Router file structure where the inbox should be integrated into the root layout.


127-127: LGTM! File path updated to match component rename.

The path change from src/components/notification-center.tsx to src/components/novu-inbox.tsx is consistent with the component rename.


132-132: LGTM! Component renamed for better clarity.

The rename from NotificationCenter to NovuInbox provides better clarity about the component's purpose and aligns with the filename change.

content/docs/platform/quickstart/react.mdx (7)

4-4: LGTM! Description improved with React Router context.

The updated description is more specific and accurately describes what the guide covers, including React Router integration.


51-55: LGTM! Simplified installation instructions.

Removing the React Router DOM dependency from the installation step simplifies the setup process. The routing setup is properly handled later in the guide.


61-61: LGTM! Component path updated consistently.

The path change from notification-center.tsx to novu-inbox.tsx is consistent with the component rename and matches the template changes.


76-77: LGTM! Step title improved for clarity.

The updated step title better describes what's being accomplished in this section - setting up routing and importing the component.


81-81: LGTM! Import statement updated to match component rename.

The import statement correctly uses the new NovuInbox component name and updated file path.


87-87: LGTM! Component usage updated consistently.

The JSX usage correctly reflects the new NovuInbox component name.


94-96: LGTM! Added Home component for routing demonstration.

The addition of a simple Home component helps demonstrate how routing works with the inbox component and provides a complete working example.

@jainpawan21 jainpawan21 merged commit c11b139 into main Aug 20, 2025
7 checks passed
@jainpawan21 jainpawan21 deleted the quickstart-quick-cleanup branch August 20, 2025 14:22
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.

2 participants