Module

Pux.Renderer.React

Package
purescript-pux
Repository
alexmingoia/purescript-pux

#dangerouslySetInnerHTML Source

#renderToDOM Source

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

 renderToDOM "#app" app.markup app.input

#renderToString Source

renderToString :: forall ev. Signal (HTML ev) -> Effect 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 ev. Signal (HTML ev) -> Effect 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 ev props. Signal (HTML ev) -> Channel (List ev) -> Effect (ReactClass props)

Return a ReactClass from a component's HTML signal.

#reactClass Source

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.

#reactClassWithProps Source

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.