Skip to content

Commit

Permalink
fixed minor typos and increased clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
mherda committed May 11, 2024
1 parent 693d3e1 commit a493e7d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/turbo-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export default TurboModuleRegistry.get<Spec>("RTNCalculator") as Spec | null;
</details>
Place the file in the `js` directory that we have just created, eg: `js/NativeRTNCalculator.ts`.
At the beginning of the spec files are the imports:
- The `TurboModule` type, which defines the base interface for all Turbo Native Modules
Expand Down Expand Up @@ -385,6 +387,7 @@ cd MyApp
yarn add ../RTNCalculator
cd ..
node MyApp/node_modules/react-native/scripts/generate-codegen-artifacts.js \
--targetPlatform ios \
--path MyApp/ \
--outputPath RTNCalculator/generated/
```
Expand Down Expand Up @@ -449,7 +452,7 @@ Now add the Native code for your Turbo Native Module. Create two files in the `R

NS_ASSUME_NONNULL_BEGIN

@interface RTNCalculator : NSObject <NativeCalculatorSpec>
@interface RTNCalculator : NSObject <NativeRTNCalculatorSpec>

@end

Expand All @@ -475,7 +478,7 @@ RCT_EXPORT_MODULE()
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
(const facebook::react::ObjCTurboModule::InitParams &)params
{
return std::make_shared<facebook::react::NativeCalculatorSpecJSI>(params);
return std::make_shared<facebook::react::NativeRTNCalculatorSpecJSI>(params);
}

@end
Expand Down Expand Up @@ -848,7 +851,7 @@ export default App;
import React from "react";
import { useState } from "react";
import { SafeAreaView, StatusBar, Text, Button } from "react-native";
import RTNCalculator from "rtn-calculator/js/NativeCalculator";
import RTNCalculator from "rtn-calculator/js/NativeRTNCalculator";

const App: () => JSX.Element = () => {
const [result, setResult] = useState<number | null>(null);
Expand Down

0 comments on commit a493e7d

Please sign in to comment.