Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Usbergo committed Oct 28, 2019
1 parent d44c7c3 commit 36f9526
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ The `withLayoutSpec` modifier allows to specify a custom configuration closure f
class CounterController: Controller<NullProps, CounterState> {

func incrementCounter() {
self.state.count += 1 . // Update the state.
print("count: \(self.state.count)")
nodeHierarchy?.setNeedsReconcile() // Trigger the reconciliation algorithm on the view hiearchy associated to this
self.state.count += 1 // Update the state.
body?.setNeedsReconcile() // Trigger the reconciliation algorithm on the view hiearchy associated to this controller.
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreRenderObjC/CRController.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NS_SWIFT_NAME(Controller)
/// The current controller state.
@property(nonatomic, readwrite) S state;
/// The UI node assigned to this controller.
@property(nonatomic, readonly, nullable, weak) CRNodeHierarchy *nodeHierarchy;
@property(nonatomic, readonly, nullable, weak) CRNodeHierarchy *body;
/// The UI node assigned to this controller.
@property(nonatomic, readonly, nullable, weak) CRNode *node;

Expand Down
2 changes: 1 addition & 1 deletion Sources/CoreRenderObjC/CRController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ @implementation CRState

@implementation CRController

- (CRNodeHierarchy *)nodeHierarchy {
- (CRNodeHierarchy *)body {
return _node.nodeHierarchy;
}

Expand Down

0 comments on commit 36f9526

Please sign in to comment.