Skip to content

Commit 409d932

Browse files
committed
Updates readme
1 parent f7037fd commit 409d932

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ const node = document.getElementById('testNode');
3232
findInstance( node ).sayHello(); // 'Hello!' in the console
3333
```
3434

35-
We will only find instances from react's class components, functional components has no instances and
36-
3735
## Installation
3836

3937
```
@@ -52,7 +50,7 @@ We can pass some options in order to retrieve the wanted instance from the DOM n
5250

5351
### Options
5452

55-
**componentName**
53+
* **componentName**
5654

5755
Sometimes there are more than one component instance linked to a DOM node. For example, when a component `render` method returns another component, or when using higher order components.
5856

@@ -77,7 +75,7 @@ findInstance( domNode, {componentName: 'ParentComponent'} );
7775
findInstance( domNode ); // ChildComponent instance
7876
```
7977

80-
**maxIteration**
78+
* **maxIteration**
8179

8280
When there are more than one component linked to the same DOM node, `findInstance` navigates recursively through the react fibers looking for the instance of the right component we want. To make this process fast and avoid infinite loops there is a maximum number of iterations that the algorithm does until it decides that the instance can't be found. By default `findInstance` iterates `4` times looking for the instance and return `false` after not finding it.
8381

0 commit comments

Comments
 (0)