Module
Next.GetServerSideProps
- Package
- purescript-nextjs
- Repository
- rowtype-yoga/purescript-nextjs
#ServerSidePropsContext Source
type ServerSidePropsContext :: Row Type -> Type
type ServerSidePropsContext params = { defaultLocale :: Maybe Locale, locale :: Maybe Locale, locales :: Maybe (Array Locale), params :: Maybe (Record params), preview :: Maybe Boolean, query :: Object String, req :: Foreign, res :: Foreign, resolvedUrl :: String }
#ServerSideProps Source
type ServerSideProps :: Type -> Row Type
type ServerSideProps props = (notFound :: Boolean, props :: props, redirect :: { destination :: String, permanent :: Boolean })
#GetServerSideProps Source
data GetServerSideProps t0 t1
#toGetServerSideProps Source
toGetServerSideProps :: forall partialProps componentProps params. (EffectFn1 Foreign (Promise partialProps)) -> GetServerSideProps params componentProps
#decodeContextOrCrash Source
decodeContextOrCrash :: forall a. ReadForeign a => Foreign -> a
#mkGetServerSideProps Source
mkGetServerSideProps :: forall props p p_ params. Union p p_ (ServerSideProps props) => ReadForeign (Record params) => ReadForeign (Record p) => WriteForeign props => WriteForeign { props :: { serialisedProps :: String } | p } => (ServerSidePropsContext params -> Aff { props :: props | p }) -> GetServerSideProps (Record params) (SerialisedProps props)