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

docs: add documentation for the Next.js app router #5265

Merged
merged 5 commits into from
Apr 1, 2025

Conversation

missionmike
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

While setting up Flagsmith for the first time in a Next.js v15 project, I had trouble getting it going because I couldn't find docs specific to the App Router. I could only find docs for the Pages Router.

After I worked through setting it up, I thought I'd contribute back to the docs to fill in the gaps.

How did you test this code?

This code is tested manually.

Testing the Docs

  1. cd into docs folder, then run npm i followed by npm run start:
image
  1. Visit: http://localhost:3000/clients/next-ssr
  2. View changes, specifically:
image

and:

image

Testing the Code Help Section

To test the code help section, run these steps:

  1. cd into frontend folder, then run npm i followed by npm run dev:
image
  1. Then visit the app at http://localhost:8080 and sign in (I used Google auth).
  2. Create an empty new project, then visit the "Features" tab.
  3. Expand the "Code example 2" tab and select "Next.js (app router)" to view the new app router version:
image
  1. Confirm that the original Next.js version is still there, relabeled as "Next.js (pages router)"

@missionmike missionmike requested review from a team as code owners March 29, 2025 00:42
@missionmike missionmike requested review from kyle-ssg and matthewelwell and removed request for a team March 29, 2025 00:42
Copy link

vercel bot commented Mar 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2025 9:01am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2025 9:01am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2025 9:01am

Copy link

vercel bot commented Mar 29, 2025

@missionmike is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard docs Documentation updates labels Mar 29, 2025
Copy link
Contributor

github-actions bot commented Mar 31, 2025

Uffizzi Preview deployment-62345 was deleted.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @missionmike! I've added a few surface level comments and will defer to @kyle-ssg (who may not have time to look until tomorrow) for the technical side of things.

Copy link
Member

@kyle-ssg kyle-ssg left a comment

Choose a reason for hiding this comment

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

Excellent contribution, thank you so much! @missionmike

@kyle-ssg kyle-ssg merged commit d8ac246 into Flagsmith:main Apr 1, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation updates front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants