Master PureScript Notes


Pux

  • Each element constructor takes an array of attributes and an array of children as properties.
    view state =
      div
          [attributes such as href, className]
          [children properties such as h1, h2, a, text]
    
  • Generally, nest everything in one div
  • Elements are in an array, so separate them with commas. For example:
    view state =
      div
          []
          [main [] []
          ,aside [] []
          ]