Module

Pux.Renderer.React

Package
purescript-pux
Repository
alexmingoia/purescript-pux

#renderToDOM Source

renderToDOM :: forall fx ev. String -> Signal (HTML ev) -> Channel (List ev) -> Eff (channel :: CHANNEL | fx) Unit
main = do
 app <- start
   { initialState
   , view
   , foldp
   , inputs: [] }

 renderToDOM "#app" app.markup app.input

#renderToString Source

renderToString :: forall fx ev. Signal (HTML ev) -> Eff (channel :: CHANNEL | fx) String

Return an HTML string from a component's HTML signal. The HTML returned includes React-specific attributes for fast mounting in the browser.

#renderToStaticMarkup Source

renderToStaticMarkup :: forall fx ev. Signal (HTML ev) -> Eff (channel :: CHANNEL | fx) String

Return an HTML string from a component's HTML signal. The HTML returned is stripped of all React-specific attributes.

#renderToReact Source

renderToReact :: forall fx props ev. Signal (HTML ev) -> Channel (List ev) -> Eff (channel :: CHANNEL | fx) (ReactClass props)

Return a ReactClass from a component's HTML signal.

#reactClass Source

reactClass :: forall props ev. ReactClass props -> String -> (HTML ev -> HTML ev)

Create an HTML constructor for a React class using a unique name. When rendered this element is replaced with the class.

#reactClassWithProps Source

reactClassWithProps :: forall props ev. ReactClass props -> String -> (props -> HTML ev -> HTML ev)

Create an HTML constructor for a React class using a unique name. When rendered this element is replaced with the class. The returned constructor takes an arbitrary props argument, which will be passed to the React class when rendered.

#dangerouslySetInnerHTML Source