Skip to content

Commit da87c27

Browse files
committed
use no inline versions for components
1 parent 06f8ae8 commit da87c27

File tree

1 file changed

+60
-52
lines changed

1 file changed

+60
-52
lines changed

src/main/scala/sri/universal/components/UniversalComponents.scala

Lines changed: 60 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ trait UniversalComponents {
8080
: ReactElement { type Instance = ActivityIndicatorComponent.type } = {
8181
val props = FunctionObjectMacro()
8282
extraProps.foreach(v => { MergeJSObjects(props, v) })
83-
CreateElementJS[ActivityIndicatorComponent.type](
83+
CreateElementJSNoInline[ActivityIndicatorComponent.type](
8484
ActivityIndicatorComponent,
8585
props.asInstanceOf[ActivityIndicatorProps],
8686
key,
@@ -194,7 +194,7 @@ trait UniversalComponents {
194194
: ReactElement { type Instance = KeyboardAvoidingViewComponent.type } = {
195195
val props = FunctionObjectMacro()
196196
extraProps.foreach(v => { MergeJSObjects(props, v) })
197-
CreateElementJS[KeyboardAvoidingViewComponent.type](
197+
CreateElementJSNoInline[KeyboardAvoidingViewComponent.type](
198198
KeyboardAvoidingViewComponent,
199199
props.asInstanceOf[KeyboardAvoidingViewProps],
200200
key,
@@ -204,7 +204,7 @@ trait UniversalComponents {
204204

205205
@inline
206206
def KeyboardAvoidingView(children: ReactNode*) =
207-
CreateElementJS[KeyboardAvoidingViewComponent.type](
207+
CreateElementJSNoInline[KeyboardAvoidingViewComponent.type](
208208
KeyboardAvoidingViewComponent,
209209
json().asInstanceOf[KeyboardAvoidingViewProps],
210210
children = children.toJSArray)
@@ -227,7 +227,7 @@ trait UniversalComponents {
227227
: ReactElement { type Instance = ScrollViewComponent.type } = {
228228
val props = FunctionObjectMacro()
229229
extraProps.foreach(v => { MergeJSObjects(props, v) })
230-
CreateElementJS[ScrollViewComponent.type](
230+
CreateElementJSNoInline[ScrollViewComponent.type](
231231
ScrollViewComponent,
232232
props.asInstanceOf[ScrollViewProps],
233233
key,
@@ -237,7 +237,7 @@ trait UniversalComponents {
237237

238238
@inline
239239
def ScrollView(children: ReactNode*) =
240-
CreateElementJS[ScrollViewComponent.type](
240+
CreateElementJSNoInline[ScrollViewComponent.type](
241241
ScrollViewComponent,
242242
json().asInstanceOf[ScrollViewProps],
243243
children = children.toJSArray)
@@ -285,18 +285,20 @@ trait UniversalComponents {
285285
: ReactElement { type Instance = ModalComponent.type } = {
286286
val props = FunctionObjectMacro()
287287
extraProps.foreach(v => { MergeJSObjects(props, v) })
288-
CreateElementJS[ModalComponent.type](ModalComponent,
289-
props.asInstanceOf[ModalProps],
290-
key,
291-
ref,
292-
children.toJSArray)
288+
CreateElementJSNoInline[ModalComponent.type](
289+
ModalComponent,
290+
props.asInstanceOf[ModalProps],
291+
key,
292+
ref,
293+
children.toJSArray)
293294
}
294295

295296
@inline
296297
def Modal(children: ReactNode*) =
297-
CreateElementJS[ModalComponent.type](ModalComponent,
298-
json().asInstanceOf[ModalProps],
299-
children = children.toJSArray)
298+
CreateElementJSNoInline[ModalComponent.type](
299+
ModalComponent,
300+
json().asInstanceOf[ModalProps],
301+
children = children.toJSArray)
300302

301303
@inline
302304
def Picker[T](style: U[js.Any] = NoValue,
@@ -310,18 +312,20 @@ trait UniversalComponents {
310312
implicit def toToAny(t: T): js.Any = t.asInstanceOf[js.Any]
311313
val props = FunctionObjectMacro()
312314
extraProps.foreach(v => { MergeJSObjects(props, v) })
313-
CreateElementJS[PickerComponent.type](PickerComponent,
314-
props.asInstanceOf[PickerProps[T]],
315-
key,
316-
ref,
317-
children.toJSArray)
315+
CreateElementJSNoInline[PickerComponent.type](
316+
PickerComponent,
317+
props.asInstanceOf[PickerProps[T]],
318+
key,
319+
ref,
320+
children.toJSArray)
318321
}
319322

320323
@inline
321324
def Picker(children: ReactNode*) =
322-
CreateElementJS[PickerComponent.type](PickerComponent,
323-
json().asInstanceOf[PickerProps[_]],
324-
children = children.toJSArray)
325+
CreateElementJSNoInline[PickerComponent.type](
326+
PickerComponent,
327+
json().asInstanceOf[PickerProps[_]],
328+
children = children.toJSArray)
325329

326330
@inline
327331
def PickerItem[T](
@@ -335,7 +339,7 @@ trait UniversalComponents {
335339
implicit def toToAny(t: T): js.Any = t.asInstanceOf[js.Any]
336340
val props = FunctionObjectMacro()
337341
extraProps.foreach(v => { MergeJSObjects(props, v) })
338-
CreateElementJS[PickerItemComponent.type](
342+
CreateElementJSNoInline[PickerItemComponent.type](
339343
PickerItemComponent,
340344
props.asInstanceOf[PickerItemProps[T]],
341345
key,
@@ -352,10 +356,11 @@ trait UniversalComponents {
352356
: ReactElement { type Instance = SliderComponent.type } = {
353357
val props = FunctionObjectMacro()
354358
extraProps.foreach(v => { MergeJSObjects(props, v) })
355-
CreateElementJS[SliderComponent.type](SliderComponent,
356-
props.asInstanceOf[SliderProps],
357-
key,
358-
ref)
359+
CreateElementJSNoInline[SliderComponent.type](
360+
SliderComponent,
361+
props.asInstanceOf[SliderProps],
362+
key,
363+
ref)
359364
}
360365

361366
@inline
@@ -371,10 +376,11 @@ trait UniversalComponents {
371376
: ReactElement { type Instance = SwitchComponent.type } = {
372377
val props = FunctionObjectMacro()
373378
extraProps.foreach(v => { MergeJSObjects(props, v) })
374-
CreateElementJS[SwitchComponent.type](SwitchComponent,
375-
props.asInstanceOf[SwitchProps],
376-
key,
377-
ref)
379+
CreateElementJSNoInline[SwitchComponent.type](
380+
SwitchComponent,
381+
props.asInstanceOf[SwitchProps],
382+
key,
383+
ref)
378384
}
379385

380386
@inline
@@ -389,18 +395,18 @@ trait UniversalComponents {
389395
: ReactElement { type Instance = TextComponent.type } = {
390396
val props = FunctionObjectMacro()
391397
extraProps.foreach(v => { MergeJSObjects(props, v) })
392-
CreateElementJS[TextComponent.type](TextComponent,
393-
props.asInstanceOf[TextProps],
394-
key,
395-
ref,
396-
children.toJSArray)
398+
CreateElementJSNoInline[TextComponent.type](TextComponent,
399+
props.asInstanceOf[TextProps],
400+
key,
401+
ref,
402+
children.toJSArray)
397403
}
398404

399405
@inline
400406
def Text(children: ReactNode*) =
401-
CreateElementJS[TextComponent.type](TextComponent,
402-
json().asInstanceOf[TextProps],
403-
children = children.toJSArray)
407+
CreateElementJSNoInline[TextComponent.type](TextComponent,
408+
json().asInstanceOf[TextProps],
409+
children = children.toJSArray)
404410

405411
@inline
406412
def AnimatedText(
@@ -412,18 +418,20 @@ trait UniversalComponents {
412418
: ReactElement { type Instance = AnimatedTextComponent.type } = {
413419
val props = FunctionObjectMacro()
414420
extraProps.foreach(v => { MergeJSObjects(props, v) })
415-
CreateElementJS[AnimatedTextComponent.type](AnimatedTextComponent,
416-
props.asInstanceOf[TextProps],
417-
key,
418-
ref,
419-
children.toJSArray)
421+
CreateElementJSNoInline[AnimatedTextComponent.type](
422+
AnimatedTextComponent,
423+
props.asInstanceOf[TextProps],
424+
key,
425+
ref,
426+
children.toJSArray)
420427
}
421428

422429
@inline
423430
def AnimatedText(children: ReactNode*) =
424-
CreateElementJS[AnimatedTextComponent.type](AnimatedTextComponent,
425-
json().asInstanceOf[TextProps],
426-
children = children.toJSArray)
431+
CreateElementJSNoInline[AnimatedTextComponent.type](
432+
AnimatedTextComponent,
433+
json().asInstanceOf[TextProps],
434+
children = children.toJSArray)
427435

428436
@inline
429437
def TextInput(style: U[js.Any] = NoValue,
@@ -447,7 +455,7 @@ trait UniversalComponents {
447455
: ReactElement { type Instance = TextInputComponent.type } = {
448456
val props = FunctionObjectMacro()
449457
extraProps.foreach(v => { MergeJSObjects(props, v) })
450-
CreateElementJS[TextInputComponent.type](
458+
CreateElementJSNoInline[TextInputComponent.type](
451459
TextInputComponent,
452460
props.asInstanceOf[TextInputProps],
453461
key,
@@ -473,7 +481,7 @@ trait UniversalComponents {
473481
: ReactElement { type Instance = TextInputComponent.type } = {
474482
val props = FunctionObjectMacro()
475483
extraProps.foreach(v => { MergeJSObjects(props, v) })
476-
CreateElementJS[TextInputComponent.type](
484+
CreateElementJSNoInline[TextInputComponent.type](
477485
TextInputComponent,
478486
props.asInstanceOf[TextInputProps],
479487
key,
@@ -496,7 +504,7 @@ trait UniversalComponents {
496504
} = {
497505
val props = FunctionObjectMacro()
498506
extraProps.foreach(v => { MergeJSObjects(props, v) })
499-
CreateElementJS[TouchableWithoutFeedbackComponent.type](
507+
CreateElementJSNoInline[TouchableWithoutFeedbackComponent.type](
500508
TouchableWithoutFeedbackComponent,
501509
props.asInstanceOf[TouchableWithoutFeedbackProps],
502510
key,
@@ -522,7 +530,7 @@ trait UniversalComponents {
522530
: ReactElement { type Instance = TouchableHighlightComponent.type } = {
523531
val props = FunctionObjectMacro()
524532
extraProps.foreach(v => { MergeJSObjects(props, v) })
525-
CreateElementJS[TouchableHighlightComponent.type](
533+
CreateElementJSNoInline[TouchableHighlightComponent.type](
526534
TouchableHighlightComponent,
527535
props.asInstanceOf[TouchableHighlightProps],
528536
key,
@@ -545,7 +553,7 @@ trait UniversalComponents {
545553
: ReactElement { type Instance = TouchableOpacityComponent.type } = {
546554
val props = FunctionObjectMacro()
547555
extraProps.foreach(v => { MergeJSObjects(props, v) })
548-
CreateElementJS[TouchableOpacityComponent.type](
556+
CreateElementJSNoInline[TouchableOpacityComponent.type](
549557
TouchableOpacityComponent,
550558
props.asInstanceOf[TouchableOpacityProps],
551559
key,
@@ -568,7 +576,7 @@ trait UniversalComponents {
568576
: ReactElement { type Instance = RefreshControlComponent.type } = {
569577
val props = FunctionObjectMacro()
570578
extraProps.foreach(v => { MergeJSObjects(props, v) })
571-
CreateElementJS[RefreshControlComponent.type](
579+
CreateElementJSNoInline[RefreshControlComponent.type](
572580
RefreshControlComponent,
573581
props.asInstanceOf[RefreshControlProps],
574582
key,

0 commit comments

Comments
 (0)