Skip to content

Commit

Permalink
docs: Update docs to no longer use hybridContext (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy authored Dec 17, 2024
1 parent 6b85f08 commit 7149abf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ body:
render: tsx
placeholder: >
class HybridMath: HybridMathSpec {
var hybridContext = margelo.nitro.HybridContext()
var memorySize: Int { return 0 }
...
}
validations:
required: true
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/hybrid-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ Hybrid Objects can be implemented in C++, Swift or Kotlin:
<TabItem value="swift" label="Swift" default>
```swift title="HybridMath.swift"
class HybridMath : HybridMathSpec {
public var hybridContext = margelo.nitro.HybridContext()
public var memorySize: Int {
return getSizeOf(self)
public override var memorySize: Int {
return 0
}

public var pi: Double {
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/nitrogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ To implement `Math` now, you just need to implement the spec:
<TabItem value="swift" label="Swift" default>
```swift title="HybridMath.swift"
class HybridMath : HybridMathSpec {
var hybridContext = margelo.nitro.HybridContext()
var memorySize: Int {
return getSizeOf(self)
public override var memorySize: Int {
return 0
}

public func add(a: Double, b: Double) throws -> Double {
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/using-nitro-in-your-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,8 @@ After installing Nitro, you can start creating your [Hybrid Objects](hybrid-obje
<TabItem value="swift" label="Swift" default>
```swift title="HybridMath.swift"
class HybridMath : HybridMathSpec {
public var hybridContext = margelo.nitro.HybridContext()
public var memorySize: Int {
return getSizeOf(self)
public override var memorySize: Int {
return 0
}

public var pi: Double {
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/view-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ Now implement `NitroImageViewManager` in Swift and Kotlin, and assume it has to
<TabItem value="swift" label="iOS (Swift)" default>
```swift
class HybridNitroImageViewManager: HybridNitroImageViewManagerSpec {
public var hybridContext = margelo.nitro.HybridContext()
public var memorySize: Int {
return getSizeOf(self)
public override var memorySize: Int {
return 0
}
private var nitroId: Double? = nil
private var view: NitroImageView? {
Expand Down

0 comments on commit 7149abf

Please sign in to comment.