#Ionicons not working with React
3 messages · Page 1 of 1 (latest)
3 messages · Page 1 of 1 (latest)
I had className in my JSX on Ionicon element but it was never read properly by browser so I changed the directive's name to class and it worked . Why is this happening? Supposing that in React we always use className instead of class.
Hi Swaraj, would you mind sharing a snippet of the code?
For eg:
export default function Navbar() {
return (
<div class="navbar">
<ion-icon class="navbar__img" name="earth-outline"></ion-icon>
<h1>My Travel Journal</h1>
</div>
);
}