@applicaster/zapp-react-native-ui-components 12.0.0-rc.100 → 12.0.0-rc.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,21 +166,23 @@ export class TransitionerComponent extends React.PureComponent<Props, State> {
166
166
 
167
167
  transitionWithoutAnimation(resetState) {
168
168
  const { scenes } = this.state;
169
-
170
- const newState = resetState
171
- ? {
172
- scenes: [prepareScene(this.props.children)],
173
- to: {
174
- index: 0,
175
- },
176
- }
177
- : {
178
- scenes: R.update(
179
- scenes.length - 1,
180
- prepareScene(this.props.children),
181
- scenes
182
- ),
183
- };
169
+ const newScene = prepareScene(this.props.children);
170
+ const isLastSceneHook = scenes[scenes.length - 1].key.startsWith("/hook");
171
+
172
+ let newState;
173
+
174
+ if (resetState) {
175
+ newState = {
176
+ scenes: [newScene],
177
+ to: { index: 0 },
178
+ };
179
+ } else if (isLastSceneHook || scenes.length === 1) {
180
+ newState = { scenes: R.update(scenes.length - 1, newScene, scenes) };
181
+ } else {
182
+ newState = {
183
+ scenes: R.compose(R.tail, R.append(newScene))(scenes),
184
+ };
185
+ }
184
186
 
185
187
  this.setState(newState);
186
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "12.0.0-rc.100",
3
+ "version": "12.0.0-rc.102",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -34,10 +34,10 @@
34
34
  "redux-mock-store": "^1.5.3"
35
35
  },
36
36
  "dependencies": {
37
- "@applicaster/applicaster-types": "12.0.0-rc.100",
38
- "@applicaster/zapp-react-native-bridge": "12.0.0-rc.100",
39
- "@applicaster/zapp-react-native-redux": "12.0.0-rc.100",
40
- "@applicaster/zapp-react-native-utils": "12.0.0-rc.100",
37
+ "@applicaster/applicaster-types": "12.0.0-rc.102",
38
+ "@applicaster/zapp-react-native-bridge": "12.0.0-rc.102",
39
+ "@applicaster/zapp-react-native-redux": "12.0.0-rc.102",
40
+ "@applicaster/zapp-react-native-utils": "12.0.0-rc.102",
41
41
  "promise": "^8.3.0",
42
42
  "react-router-native": "^5.1.2",
43
43
  "url": "^0.11.0",