22
33import React from "react" ;
44
5- export function createComponent ( ) {
5+ export const createComponent = ( function ( ) {
66 // Begin component prototype functions
77 // (`this`-dependent, defined outside `createComponent`
88 // for a slight performance boost)
@@ -95,7 +95,7 @@ export function createComponent() {
9595
9696 return Component ;
9797 } ;
98- }
98+ } ) ( ) ;
9999
100100export function readProps ( self ) {
101101 return function ( ) {
@@ -134,24 +134,22 @@ export function runUpdate_(update, self, action) {
134134 ) ;
135135}
136136
137- export function _make ( _unionDict ) {
138- return function ( $$type ) {
139- return function ( $$spec ) {
140- var $$specPadded = {
141- initialState : $$spec . initialState ,
142- render : $$spec . render ,
143- didMount : $$spec . didMount ,
144- shouldUpdate : $$spec . shouldUpdate ,
145- didUpdate : $$spec . didUpdate ,
146- willUnmount : $$spec . willUnmount ,
147- } ;
148- return function ( $$props ) {
149- var props = {
150- $$props : $$props ,
151- $$spec : $$specPadded ,
152- } ;
153- return React . createElement ( $$type , props ) ;
137+ export function _make ( $$type ) {
138+ return function ( $$spec ) {
139+ var $$specPadded = {
140+ initialState : $$spec . initialState ,
141+ render : $$spec . render ,
142+ didMount : $$spec . didMount ,
143+ shouldUpdate : $$spec . shouldUpdate ,
144+ didUpdate : $$spec . didUpdate ,
145+ willUnmount : $$spec . willUnmount ,
146+ } ;
147+ return function ( $$props ) {
148+ var props = {
149+ $$props : $$props ,
150+ $$spec : $$specPadded ,
154151 } ;
152+ return React . createElement ( $$type , props ) ;
155153 } ;
156154 } ;
157155}
@@ -164,37 +162,35 @@ export function displayNameFromSelf(self) {
164162 return exports . displayNameFromComponent ( self . instance_ . constructor ) ;
165163}
166164
167- export function _toReactComponent ( _unionDict ) {
168- return function ( fromJSProps ) {
169- return function ( $$type ) {
170- return function ( $$spec ) {
171- var $$specPadded = {
172- initialState : $$spec . initialState ,
173- render : $$spec . render ,
174- didMount : $$spec . didMount ,
175- shouldUpdate : $$spec . shouldUpdate ,
176- didUpdate : $$spec . didUpdate ,
177- willUnmount : $$spec . willUnmount ,
178- } ;
165+ export function _toReactComponent ( fromJSProps ) {
166+ return function ( $$type ) {
167+ return function ( $$spec ) {
168+ var $$specPadded = {
169+ initialState : $$spec . initialState ,
170+ render : $$spec . render ,
171+ didMount : $$spec . didMount ,
172+ shouldUpdate : $$spec . shouldUpdate ,
173+ didUpdate : $$spec . didUpdate ,
174+ willUnmount : $$spec . willUnmount ,
175+ } ;
179176
180- var Component = function constructor ( ) {
181- return this ;
182- } ;
177+ var Component = function constructor ( ) {
178+ return this ;
179+ } ;
183180
184- Component . prototype = Object . create ( React . Component . prototype ) ;
181+ Component . prototype = Object . create ( React . Component . prototype ) ;
185182
186- Component . displayName = $$type . displayName + " (Wrapper)" ;
183+ Component . displayName = $$type . displayName + " (Wrapper)" ;
187184
188- Component . prototype . render = function ( ) {
189- var props = {
190- $$props : fromJSProps ( this . props ) ,
191- $$spec : $$specPadded ,
192- } ;
193- return React . createElement ( $$type , props ) ;
185+ Component . prototype . render = function ( ) {
186+ var props = {
187+ $$props : fromJSProps ( this . props ) ,
188+ $$spec : $$specPadded ,
194189 } ;
195-
196- return Component ;
190+ return React . createElement ( $$type , props ) ;
197191 } ;
192+
193+ return Component ;
198194 } ;
199195 } ;
200- }
196+ }
0 commit comments