mirror of
https://github.com/facebook/react.git
synced 2026-02-24 04:33:04 +00:00
19 lines
274 B
JavaScript
19 lines
274 B
JavaScript
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
class Custom {
|
|
_number = 42;
|
|
get number() {
|
|
return this._number;
|
|
}
|
|
}
|
|
|
|
export default function CustomObject() {
|
|
return <ChildComponent customObject={new Custom()} />;
|
|
}
|
|
|
|
function ChildComponent(props: any) {
|
|
return null;
|
|
}
|