Skip to content

Commit

Permalink
Use codegen for Fantom native module
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

This moves the native module definition for Fantom to the `react-native` package so we can migrate the module to use the codegen.

Also implements the migration.

Differential Revision: D67759729
  • Loading branch information
rubennorte authored and facebook-github-bot committed Jan 2, 2025
1 parent af7531b commit 10d83e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* @oncall react_native
*/

import NativeFantom from './specs/NativeFantom';
// $FlowExpectedError[untyped-import]
import micromatch from 'micromatch';
import * as React from 'react';
import NativeFantom from 'react-native/src/private/specs/modules/NativeFantom';

export type RenderOutputConfig = {
...FantomRenderedOutputConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-fantom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import type {
import type {MixedElement} from 'react';

import getFantomRenderedOutput from './getFantomRenderedOutput';
import NativeFantom from './specs/NativeFantom';
import ReactFabric from 'react-native/Libraries/Renderer/shims/ReactFabric';
import NativeFantom from 'react-native/src/private/specs/modules/NativeFantom';

let globalSurfaceIdCounter = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @flow strict
* @format
*/

import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport';
import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';

import {TurboModuleRegistry} from 'react-native';
import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';

// match RenderFormatOptions.h
export type RenderFormatOptions = {
Expand Down

0 comments on commit 10d83e4

Please sign in to comment.