Module

Pux.Renderer.React

Package
purescript-pux
Repository
alexmingoia/purescript-pux

#renderToDOMSource

renderToDOM :: forall ev fx. 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

#renderToStringSource

renderToString :: forall ev fx. 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.

#renderToStaticMarkupSource

renderToStaticMarkup :: forall ev fx. 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.

#renderToReactSource

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

Return a ReactClass from a component's HTML signal.

#reactClassSource

reactClass :: forall ev props. 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.

#reactClassWithPropsSource

reactClassWithProps :: forall ev props. 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.

#dangerouslySetInnerHTMLSource