From 3d31b348a82aca9afd47cfad5ea85c016d0bc7ba Mon Sep 17 00:00:00 2001 From: Alan Thompson Date: Mon, 5 Nov 2018 14:26:50 -0800 Subject: [PATCH] minor cleanup --- doc/InteropWithReact.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/InteropWithReact.md b/doc/InteropWithReact.md index fd3e6d0..5bdded6 100644 --- a/doc/InteropWithReact.md +++ b/doc/InteropWithReact.md @@ -128,13 +128,13 @@ Some React components expect a function as their only child. React autosizer is ## Getting props and children of current component -Because you just pass argument to reagent functions, you typically don't need to think about "props" and "children" as distinct things. But reagent does make a distinction and it is helpful to understand this particularly when interoperating with native elements and React libraries. +Because you just pass arguments to reagent functions, you typically don't need to think about "props" and "children" as distinct things. But Reagent does make a distinction and it is helpful to understand this, particularly when interoperating with native elements and React libraries. -Specifically, if the first argument to your reagent function is a map, that is assigned to `this.props` of the underlying reagent component. All other arguments are assigned as children to `this.props.children`. +Specifically, if the first argument to your Reagent function is a map, that is assigned to `this.props` of the underlying Reagent component. All other arguments are assigned as children to `this.props.children`. When interacting with native React components, it may be helpful to access props and children, which you can do with `reagent.core/current-component`. This function returns an object that allows you retrieve the props and children passed to the current component. -Beware that `current-component` is only valid in component functions, and must be called outside of e.g event handlers and for expressions, so it’s safest to always put the call at the top, as in `my-div` here: +Beware that `current-component` is only valid in component functions, and must be called outside of e.g event handlers and `for` expressions, so it’s safest to always put the call at the top, as in `my-div` here: ```clojure (ns example