From 7efbdc8b59bc6b7f2ec9c5654bc32da54aa66762 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 30 Mar 2017 12:40:04 -0300 Subject: [PATCH] Plugins can trigger own actions with core reducers --- client/coral-framework/components/Slot.js | 3 ++- plugins/coral-plugin-respect/client/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/coral-framework/components/Slot.js b/client/coral-framework/components/Slot.js index d5a364aee..54cb96271 100644 --- a/client/coral-framework/components/Slot.js +++ b/client/coral-framework/components/Slot.js @@ -3,9 +3,10 @@ import {importer as injectPlugins} from 'coral-framework/helpers/importer'; class Slot extends Component { render() { + const {pluginProps: actions, ...props} = this.props; return (
- {injectPlugins(this.props)} + {injectPlugins({...props, actions})}
); } diff --git a/plugins/coral-plugin-respect/client/index.js b/plugins/coral-plugin-respect/client/index.js index d5ecc5f0d..9eb9b7cb9 100644 --- a/plugins/coral-plugin-respect/client/index.js +++ b/plugins/coral-plugin-respect/client/index.js @@ -3,7 +3,8 @@ import styles from './style.css'; export default (props) => (
- + {console.log(props)} +
);