Skip to content

Commit 8604be8

Browse files
authored
unstable_createElement(component, props, options, ...children)
Mirror `React.createElement(component, props, ...children)` as close as possible without breaking current implementation of unstable_createElement
1 parent fcbe2d1 commit 8604be8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/react-native-web/src/exports/createElement

‎packages/react-native-web/src/exports/createElement/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import createDOMProps from '../../modules/createDOMProps';
1414
import React from 'react';
1515
import { LocaleProvider } from '../../modules/useLocale';
1616

17-
const createElement = (component, props, options) => {
17+
const createElement = (component, props, options, ...children) => {
1818
// Use equivalent platform elements where possible.
1919
let accessibilityComponent;
2020
if (component && component.constructor === String) {
@@ -24,7 +24,7 @@ const createElement = (component, props, options) => {
2424
const Component = accessibilityComponent || component;
2525
const domProps = createDOMProps(Component, props, options);
2626

27-
const element = React.createElement(Component, domProps);
27+
const element = React.createElement(Component, domProps, ...children);
2828

2929
// Update locale context if element's writing direction prop changes
3030
const elementWithLocaleProvider = domProps.dir ? (

0 commit comments

Comments
 (0)