UNPKG

dinou

Version:

Dinou is a modern React 19 framework with React Server Components, Server Functions, and streaming SSR.

18 lines (15 loc) 473 B
const getJSX = require("./get-jsx.js"); const getSSGJSX = require("./get-ssg-jsx.js"); async function getSSGJSXOrJSX( reqPath, query, cookies = {}, isDevelopment = false ) { const result = Object.keys(query).length || isDevelopment || Object.keys(cookies).length ? await getJSX(reqPath, query, cookies) : (await getSSGJSX(reqPath)) ?? (await getJSX(reqPath, query, cookies)); return result; } module.exports = getSSGJSXOrJSX;