1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  * @flow
    
  8.  */
    
  9. const {useMemo, useState} = require('react');
    
  10. 
    
  11. function Component(props) {
    
  12.   const InnerComponent = useMemo(() => () => {
    
  13.     const [state] = useState(0);
    
  14. 
    
  15.     return state;
    
  16.   });
    
  17.   props.callback(InnerComponent);
    
  18. 
    
  19.   return null;
    
  20. }
    
  21. 
    
  22. module.exports = {Component};