Comparing version
@@ -756,2 +756,6 @@ 'use strict'; | ||
// when wrapping a React component | ||
beforeWrapper (input, Klass) | ||
afterWrapper (input, Klass, Kea) | ||
// Run after mounting and before rendering the component in React's scope (you can use hooks here) | ||
@@ -1094,3 +1098,4 @@ beforeRender (logic, props) | ||
var wrapper = function wrapper(Klass) { | ||
// make this.actions work if it's a React.Component we're operating with | ||
runPlugins(plugins, 'beforeWrapper', input, Klass); // make this.actions work if it's a React.Component we're operating with | ||
injectActionsIntoClass(Klass); | ||
@@ -1101,3 +1106,4 @@ var Connect = reactRedux.connect(mapStateToPropsCreator(input, plugins), mapDispatchToPropsCreator(input, plugins))(Klass); // inject proptypes into the class if it's a React.Component | ||
var injectPropTypes = !isStateless(Klass); | ||
return function Kea(props) { | ||
var Kea = function Kea(props) { | ||
var logic = convertInputToLogic({ | ||
@@ -1137,2 +1143,5 @@ input: input, | ||
}; | ||
runPlugins(plugins, 'afterWrapper', input, Klass, Kea); | ||
return Kea; | ||
}; // TODO: legacy names. remove/change them? | ||
@@ -1139,0 +1148,0 @@ |
{ | ||
"name": "kea", | ||
"version": "1.0.0-beta.16", | ||
"version": "1.0.0-beta.17", | ||
"description": "Smart front-end architecture", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -20,2 +20,4 @@ import React, { useEffect, useRef } from 'react' | ||
const wrapper = (Klass) => { | ||
runPlugins(plugins, 'beforeWrapper', input, Klass) | ||
// make this.actions work if it's a React.Component we're operating with | ||
@@ -33,3 +35,3 @@ injectActionsIntoClass(Klass) | ||
return function Kea (props) { | ||
const Kea = function (props) { | ||
const logic = convertInputToLogic({ input, props, plugins }) | ||
@@ -65,2 +67,6 @@ | ||
} | ||
runPlugins(plugins, 'afterWrapper', input, Klass, Kea) | ||
return Kea | ||
} | ||
@@ -67,0 +73,0 @@ |
@@ -47,2 +47,6 @@ import { getCache } from '../cache/provider' | ||
// when wrapping a React component | ||
beforeWrapper (input, Klass) | ||
afterWrapper (input, Klass, Kea) | ||
// Run after mounting and before rendering the component in React's scope (you can use hooks here) | ||
@@ -49,0 +53,0 @@ beforeRender (logic, props) |
177682
0.28%4427
0.25%