프로그래밍/NextJS

next Radix 설치 및 사용

타코코딩 2024. 1. 22. 19:17

Radix

Radix-UI

import '@radix-ui/themes/styles.css';
  • 전역 layout.tsx에붙이기

마크다운에디터추가

  • npm install --save react-simplemde-editor easymde
  • npm i react-markdown
  • npm i -D @tailwindcss/typography (플러그인에써야함)
import SimpleMdeReact from "react-simplemde-editor";
import "easymde/dist/easymde.min.css";
      <SimpleMdeReact />;
  • next js사용시 lazyloading으로 에러해결
const SimpleMDE = dynamic(() => import("react-simplemde-editor"), {
  ssr: false,
});