From 7d12f7853b8b64e7850c1ffff40f279b16cf0f65 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 2 May 2015 08:45:11 +0930 Subject: [PATCH] Allow components to initialise props --- js/lib/component.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/lib/component.js b/js/lib/component.js index 1709592f5..379fc3ac9 100644 --- a/js/lib/component.js +++ b/js/lib/component.js @@ -23,6 +23,9 @@ export default class Component { */ static component(props) { props = props || {}; + if (this.props) { + props = this.props(props); + } var view = function(component) { component.props = props; return component.view();