Skip to content

Commit f4bf2d5

Browse files
committed
Change children type from JSX.Element to React.ReactNode
1 parent 31f92a4 commit f4bf2d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ class App extends React.Component {
179179
ReactDOM.render(<App />, document.getElementById('root'));
180180
```
181181

182-
# License
182+
## License
183183

184184
This project is licensed under the MIT License - see the [LICENSE](https://github.com/davidnguyen179/react-is-in-viewport/blob/master/LICENSE) file for details

src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ type Props = DataProps & EventProps;
174174

175175
interface DataProps {
176176
/** React component node */
177-
children: JSX.Element | JSX.Element[] | string;
177+
children: React.ReactNode;
178178
/** Delay time for scroll event */
179179
delay?: number;
180180
/** Type of check component if it is in the viewport */

0 commit comments

Comments
 (0)