Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 787 Bytes

README.md

File metadata and controls

37 lines (29 loc) · 787 Bytes

This is NextJS with ReScript project.

How to use

NextJS Page

Note: You should make page.js file

let default = () =>
  <div className="px-4 py-8 container mx-auto">{"Hello NextJS!" -> React.string}</div>

NextJS Api Route

let default = (req: NextApi.req, res: NextApi.res) => {
  res
  ->NextApi.status(200)
  ->NextApi.send({
    "message": {
      switch req->NextApi.query->Js.Dict.get("message") {
      | Some(message) => message
      | None => "Hello ReScript!"
      }
    },
  })
}

To-Do

  • tailwindcss
    • More simplify tailwindcss (how?)
  • NextJS API NextApiRequest, NextApiResponse
  • Multiple page support
    • More better multiple page support