You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
In order to create a canal, use the `createCanal` function. Pass it your screens in the business order.
32
29
33
30
```ts
34
-
importReactfrom"react";
35
-
import { createCanal } from"react-gondola";
36
-
import { FirstName } from"./FirstName";
37
-
import { LastName } from"./LastName";
31
+
importReactfrom'react';
32
+
import { createCanal } from'react-gondola';
33
+
import { FirstName } from'./FirstName';
34
+
import { LastName } from'./LastName';
38
35
39
36
const SignInCanal =createCanal([
40
-
{ name: "firstName", Component: FirstName },
41
-
{ name: "lastName", Component: LastName }
37
+
{ name: 'firstName', Component: FirstName },
38
+
{ name: 'lastName', Component: LastName },
42
39
]);
43
40
```
44
41
45
42
Then, use the canal wherever you want in your app. Specify whether to show/hide a screen by using the screen's name as a prop:
46
43
47
44
```ts
48
-
importReact, { Component } from"react";
49
-
import { SignInCanal } from"./canals/SignIn";
45
+
importReact, { Component } from'react';
46
+
import { SignInCanal } from'./canals/SignIn';
50
47
51
48
exportdefaultclassAppextendsComponent {
52
49
render() {
@@ -62,24 +59,24 @@ That's all !
62
59
If you want to add full screen page, pass the `isFullScreen` flag to the right page when creating a canal. In the following example, `confirm` is a full screen page.
0 commit comments