# Whenever I pass onClick on a React Icon Component I get a typescript error

**URL:** <https://forum.codewithmosh.com/t/whenever-i-pass-onclick-on-a-react-icon-component-i-get-a-typescript-error/19766>\
**Category:** React\
**Created:** [April 22, 2023, 6:31am UTC](https://forum.codewithmosh.com/t/whenever-i-pass-onclick-on-a-react-icon-component-i-get-a-typescript-error/19766 "2023-04-22T06:31:25Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![SubuHunter](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/subuhunter/32/5722_2.png) [@SubuHunter](https://forum.codewithmosh.com/u/SubuHunter)\
**Post date:** [July 26, 2023, 3:59pm UTC](https://forum.codewithmosh.com/t/whenever-i-pass-onclick-on-a-react-icon-component-i-get-a-typescript-error/19766/9 "2023-07-26T15:59:15Z")

</div>

Hi @ashutoshshelke ,

I ignored the warning and moved on to the other course videos. I felt I can debug that if i get it in projects. It was a weird issue though.

Sorry I couldn’t help.

---

_[View the full topic](https://forum.codewithmosh.com/t/whenever-i-pass-onclick-on-a-react-icon-component-i-get-a-typescript-error/19766)._
