Try className="note-view-article-container"
instead of className=".note-view-article-container"
. How to apply css styles in react
export function NoteView(props: Note) {
const { id, title } = props;
return (
<article className="note-view-article-container">
<p className="note-view-title">
{title}
</p>
</article>
);
}
And, it is hard to reason without seeing the full source code of the component, but most likely you don't need a key
property for the <article />
tag. If you want to render NoteView
in the list, what you need to do is to set key
property to the component: <NoteView id={id} title={title} key={id} />