I am using NextJS, TypeScript and Fluent UI. I have generated the app using yarn create next-app --typescript
.
Later on I added Fluent UI using $ yarn add @fluentui/react
command.
I have not added anything else. I am using (https://developer.microsoft.com/en-us/fluentui#/controls/web/button) guide for Fluent UI.
This is what my index.tsx
file look like:
import { DefaultButton, PrimaryButton } from "@fluentui/react";
export default function Home() {
function buttonClicked() {
alert("Clicked");
}
return (
<div>
<DefaultButton
text="Standard"
onClick={buttonClicked}
allowDisabledFocus
/>
<PrimaryButton text="Primary" onClick={buttonClicked} />
</div>
);
}
I run the app using $ yarn dev
command.
When I open the app in browser using http://localhost:3000/
, It displays the buttons but gives following errors in console.
What is the reason for that? Am I missing something? Can anyone please help?