File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @storybook/addon-devkit" ,
3- "version" : " 1.0.0-alpha.0 " ,
3+ "version" : " 1.0.0-alpha.1 " ,
44 "description" : " Storybook Addon Development Kit" ,
55 "author" : {
66 "name" : " Oleg Proskurin" ,
Original file line number Diff line number Diff line change @@ -150,3 +150,10 @@ export default class ChannelStore {
150150 this . removeData ( ) ;
151151 } ;
152152}
153+
154+ let singleStore ;
155+
156+ export const getSingleStore = ( ...args ) => {
157+ singleStore = singleStore || new ChannelStore ( ...args )
158+ return singleStore ;
159+ } ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22
3- import ChannelStore from './ChannelStore' ;
3+ import { getSingleStore } from './ChannelStore' ;
44
55const getDisplayName = WrappedComponent =>
66 WrappedComponent . displayName || WrappedComponent . name || 'Component' ;
@@ -45,7 +45,7 @@ const withChannel = ({
4545 isReceived,
4646 } ;
4747
48- this . store = new ChannelStore ( {
48+ this . store = getSingleStore ( {
4949 EVENT_ID_INIT ,
5050 EVENT_ID_DATA ,
5151 EVENT_ID_BACK ,
You can’t perform that action at this time.
0 commit comments