Custom Compoenents Rendering

Hi, I am new to Streamlit and just started using it.
I was working with Custom Components when as usually I prefer using hooks and arrow function in react. but when I was trying to render the component it was not showing up properly basically if I made an error and corrected it, the component would render, so to track this problem I decided to do what that guy was doing in the streamlit tutorial for custom component. and use the class component and that just worked. anyways I wanted to know is it just me or anyone else faced the same problem.