question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native init with multiple arguments.

See original GitHub issue

Using init command with multiple arguments

I was trying to init rn v0.68.2 with typescript template and I was always getting latest version with typescript template. It seems that the --version command gets overwritten. Is it on purpose?

both commands does not work as expected.

npx react-native init AwesomeTSProject --version 0.68.2 --template react-native-template-typescript npx react-native init AwesomeTSProject --template react-native-template-typescript --version 0.68.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
thymikeecommented, Jul 5, 2022

It’s on purpose. Use:

npx react-native init AwesomeTSProject --template react-native-template-typescript@0.68.2
1reaction
thymikeecommented, Sep 15, 2022

Happy to accept a PR adding a warning about this behavior when both --version and --template are used

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I pass two parameters to a function? (react native)
Instead of binding in the JSX, do it in your constructor instead, then your delete method you can define the arguments you expect...
Read more >
Setting up the development environment - React Native
Run the following command to create a new React Native project called "AwesomeProject": npm; Yarn. npx create-expo-app AwesomeProject
Read more >
React Native Global Scope Variables | Initialize once use ...
In React Native we can make any variable Global Scope Variables by just putting global as prefix. ... npx react-native init ProjectName --version...
Read more >
Hooks API Reference - React
React may group several state updates into a single re-render to improve performance. ... To do this, you can pass an init function...
Read more >
What is a clean, Pythonic way to have multiple constructors in ...
Need for multiple constructors · Overloading constructors based on arguments. · Calling methods from __init__. · Using @classmethod decorator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found