-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
If you name your app with hyphens react-native will create a broken project by default #213
Comments
I did the exact same thing. 🐒 |
ah, good point! |
This is weird, why couldn't the hyphens be removed and the thing kebab-cased where it needed to be? Even if I change the project name in package.json to use hyphens after creation then the |
I'm very inclined to agree with @dominictobias on this one - it's very frustrating to have just the react-native projects named inconsistently to the rest of an NPM package set and runs contrary to the norms of the ecosystem. @amasad: Is there any scope to re-open this issue or has the react-native team decided that this is a matter of policy/won't fix? I'm happy to knock together a PR for this, as there's only a finite number of places this occurs. What I'd propose to do is:
Can do this sometime this week? |
Here's a workaround that I've tried and tested.
If I'm missing a reason this won't work, please do let me know. |
react-native upgrade will fail if you change the project name from camelCase to kabob-case. So while you can run the project this way, you're stuck there without additional workarounds. |
This is just a fallback in case flex-button doesn't work. facebook/react-native#213 If you name your app with hyphens react-native will create a broken project by default. This is not a project, so it shouldn't be an issue, but we'll see.
If you do something like:
React will create a project scaffold for you but the resulting javascript file will fail to load.
So you will get something like:
In your index.ios.js file.
Not a huge problem but it should probably remove hyphens the hyphens non the less.
The text was updated successfully, but these errors were encountered: