Skip to content

feat: add X-React-Native-Project-Root header to dev server#18

Merged
natew merged 1 commit intoonejs:mainfrom
szymonrybczak:feat/add-missing-header
Jan 29, 2024
Merged

feat: add X-React-Native-Project-Root header to dev server#18
natew merged 1 commit intoonejs:mainfrom
szymonrybczak:feat/add-missing-header

Conversation

@szymonrybczak
Copy link
Copy Markdown
Contributor

Summary

To properly support @react-native-community/cli a dev server needs to return a header called X-React-Native-Project-Root with path to the project root.

Before:

❯ yarn ios
yarn run v1.22.19
$ react-native run-ios
info Another process is running on port 8081.
? Use port 8082 instead? › - Use arrow-keys. Return to submit.
❯   Yes
    No

After:

❯ yarn ios
yarn run v1.22.19
$ react-native run-ios
info A dev server is already running for this project on port 8081.

Test plan

  1. Bootstrap project with npx react-native@latest init
  2. Do all necessary steps to setup vxrn inside project
  3. Start a dev server, and run yarn ios -> RN CLI should detect dev server on selected port.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 27, 2024

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

Name Status Preview Comments Updated (UTC)
vrn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2024 2:58pm

@szymonrybczak
Copy link
Copy Markdown
Contributor Author

@natew wdyt about adding example to repo with bare React Native Community CLI setup?

@natew
Copy link
Copy Markdown
Collaborator

natew commented Jan 29, 2024

down for that definitely.

@natew natew merged commit 3323a51 into onejs:main Jan 29, 2024
zetavg added a commit that referenced this pull request Sep 29, 2024
…xpo Go on iPhone (#18)

* fix: RN bundle syntax error

* print QR code for opening the app on server start

* [Expo Go] use a static logo for icon and splash screen

* yarn install
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