Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Commit 325659c

Browse files
bc022699bc022699
authored andcommitted
Update bindings to Framework7 Redux
1 parent b143333 commit 325659c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ tsconfig.json
44
src/
55
kitchen-sink/
66
.vscode/
7-
framework7-custom-build.js
7+
framework7-custom-build.js
8+
framework7-react-component-gen.js
9+
framework7-vue/
10+
framework7-react/

src/components/Framework7App.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface IFramework7AppProps extends IFramework7Params, React.Props<any>
4343
routes: IFramework7Route[];
4444
onFramework7Init?: (framework7: Framework7) => void;
4545
onRouteChange?: (route: IFramework7Route) => void;
46+
stateKernel?: { setFramework7: (f7: any) => void; setRouter: (router: any) => void; }
4647
}
4748

4849
export class Framework7App extends React.Component<IFramework7AppProps, Framework7> {
@@ -115,6 +116,11 @@ export class Framework7App extends React.Component<IFramework7AppProps, Framewor
115116
this.framework7InitCallbacks.forEach(callback => {
116117
callback(this.framework7);
117118
});
119+
120+
if (this.props.stateKernel) {
121+
this.props.stateKernel.setFramework7(this.framework7);
122+
this.props.stateKernel.setRouter(this.router);
123+
}
118124
}
119125

120126
private getFramework7(callback: (framework7: Framework7) => void) {

0 commit comments

Comments
 (0)