From 7d43bd28ddfc82f0d3ff6fa70e7bfee46cbd8e02 Mon Sep 17 00:00:00 2001 From: Mitch Ryan Date: Tue, 24 Jul 2018 14:03:48 +1200 Subject: [PATCH] Use class-instance render-prop pattern in Accordion.wrapper --- src/Accordion/Accordion.wrapper.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Accordion/Accordion.wrapper.js b/src/Accordion/Accordion.wrapper.js index 4a3192ec..6f2f8fde 100644 --- a/src/Accordion/Accordion.wrapper.js +++ b/src/Accordion/Accordion.wrapper.js @@ -37,17 +37,18 @@ class AccordionWrapper extends Component { this.accordionStore.setOnChange(this.props.onChange); } - render() { + renderAccordion = (accordionStore: AccordionContainer) => { const { accordion, onChange, ...rest } = this.props; + return ( + + ); + }; + + render() { return ( - {accordionStore => ( - - )} + {this.renderAccordion} );