Skip to content

Commit a462078

Browse files
ulfie22rigor789
authored andcommitted
Update 4-upgrade-guide.md (#202)
It took me a while to figure out why none of my props data was showing up. Hopefully this can save future upgraders...
1 parent 3c5ce2c commit a462078

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

content/docs/en/getting-started/4-upgrade-guide.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,48 @@ Change the path:
111111
<Image v-if="surprise" src="~/assets/images/NativeScript-Vue.png"/>
112112
```
113113

114-
**Step 6: Align `package.json`**
114+
**Step 6: Fix Manual Routing Props (if necessary)**
115+
116+
If your app uses manual routing, please note that the syntax for passing props has changed.
117+
118+
Old syntax:
119+
120+
```js
121+
this.$navigateTo(NewPage, {
122+
transition: {},
123+
transitionIOS: {},
124+
transitionAndroid: {},
125+
126+
context: {
127+
propsData: {
128+
name: this.name,
129+
value: this.value
130+
}
131+
}
132+
});
133+
```
134+
135+
New syntax:
136+
137+
```js
138+
this.$navigateTo(NewPage, {
139+
transition: {},
140+
transitionIOS: {},
141+
transitionAndroid: {},
142+
143+
props: {
144+
name: this.name,
145+
value: this.value
146+
}
147+
});
148+
```
149+
150+
151+
**Step 7: Align `package.json`**
115152

116153
Copy the relevant values from your old app's root `package.json` file into the new app's root `package.json` file. This will most likely entail copying the `Dependencies:` block, but you might also need to realign the new app's app version and description at the top of `package.json`.
117154

118-
**Step 7: Clean and run**
155+
**Step 8: Clean and run**
119156

120157
At this point, it's a good idea to clean the new app's folders (if you have run it prior) and reinstall any dependencies.
121158

0 commit comments

Comments
 (0)