-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
73 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ jobs: | |
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Test | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { createDomain } from 'effector'; | ||
|
||
export const defaultDomain = createDomain('framework/default'); | ||
export const defaultDomain = createDomain('bypath/default'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import React from 'react'; | ||
import { sample } from 'effector'; | ||
|
||
import { createHatch, withHatch } from '../../../src'; | ||
import { createRoute, withRoute } from '../../../src'; | ||
import { pageNameSet, root } from './internal'; | ||
|
||
const hatch = createHatch(root); | ||
const route = createRoute(root); | ||
|
||
const PageAnother = withHatch(hatch, () => { | ||
const PageAnother = withRoute(route, () => { | ||
return <div>For example just another page</div>; | ||
}); | ||
|
||
export default PageAnother; | ||
|
||
sample({ | ||
source: hatch.enter, | ||
source: route.enter, | ||
fn: () => 'page-another', | ||
target: pageNameSet, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import React from 'react'; | ||
import { sample } from 'effector'; | ||
|
||
import { createHatch, withHatch } from '../../../src'; | ||
import { createRoute, withRoute } from '../../../src'; | ||
import { pageNameSet, root } from './internal'; | ||
|
||
const hatch = createHatch(root); | ||
const route = createRoute(root); | ||
|
||
hatch.enter.watch((e) => console.info('PAGE1 Hatch Enter', e)); | ||
route.enter.watch((e) => console.info('PAGE1 Hatch Enter', e)); | ||
|
||
const Page1 = withHatch(hatch, () => { | ||
const Page1 = withRoute(route, () => { | ||
return <div>For example first page</div>; | ||
}); | ||
|
||
export default Page1; | ||
|
||
sample({ | ||
source: hatch.enter, | ||
source: route.enter, | ||
fn: () => 'page1', | ||
target: pageNameSet, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters