|
| 1 | +## Module React |
| 2 | + |
| 3 | +#### `DOM` |
| 4 | + |
| 5 | +``` purescript |
| 6 | +data DOM :: ! |
| 7 | +``` |
| 8 | + |
| 9 | +#### `UI` |
| 10 | + |
| 11 | +``` purescript |
| 12 | +data UI :: * |
| 13 | +``` |
| 14 | + |
| 15 | +#### `UIRef` |
| 16 | + |
| 17 | +``` purescript |
| 18 | +data UIRef :: # ! -> * |
| 19 | +``` |
| 20 | + |
| 21 | +#### `EventHandler` |
| 22 | + |
| 23 | +``` purescript |
| 24 | +data EventHandler :: * -> * |
| 25 | +``` |
| 26 | + |
| 27 | +#### `Disallowed` |
| 28 | + |
| 29 | +``` purescript |
| 30 | +data Disallowed :: ! |
| 31 | +``` |
| 32 | + |
| 33 | +#### `ReadAllowed` |
| 34 | + |
| 35 | +``` purescript |
| 36 | +data ReadAllowed :: ! |
| 37 | +``` |
| 38 | + |
| 39 | +#### `WriteAllowed` |
| 40 | + |
| 41 | +``` purescript |
| 42 | +data WriteAllowed :: ! |
| 43 | +``` |
| 44 | + |
| 45 | +#### `ReactState` |
| 46 | + |
| 47 | +``` purescript |
| 48 | +data ReactState :: # ! -> * -> ! |
| 49 | +``` |
| 50 | + |
| 51 | +#### `ReactProps` |
| 52 | + |
| 53 | +``` purescript |
| 54 | +data ReactProps :: * -> ! |
| 55 | +``` |
| 56 | + |
| 57 | +#### `ReactRefs` |
| 58 | + |
| 59 | +``` purescript |
| 60 | +data ReactRefs :: * -> ! |
| 61 | +``` |
| 62 | + |
| 63 | +#### `noop0` |
| 64 | + |
| 65 | +``` purescript |
| 66 | +noop0 :: forall eff result. Eff eff result |
| 67 | +``` |
| 68 | + |
| 69 | +#### `noop1` |
| 70 | + |
| 71 | +``` purescript |
| 72 | +noop1 :: forall a eff result. a -> Eff eff result |
| 73 | +``` |
| 74 | + |
| 75 | +#### `noop2` |
| 76 | + |
| 77 | +``` purescript |
| 78 | +noop2 :: forall a b eff result. a -> b -> Eff eff result |
| 79 | +``` |
| 80 | + |
| 81 | +#### `Render` |
| 82 | + |
| 83 | +``` purescript |
| 84 | +type Render props refs state eff = Eff (props :: ReactProps props, refs :: Disallowed, state :: ReactState (read :: ReadAllowed) state | eff) UI |
| 85 | +``` |
| 86 | + |
| 87 | +#### `UISpec` |
| 88 | + |
| 89 | +``` purescript |
| 90 | +type UISpec props refs state eff1 eff2 eff3 eff4 eff5 eff6 eff7 eff8 = { getInitialState :: Eff (props :: ReactProps props, state :: Disallowed, refs :: Disallowed | eff1) state, componentWillMount :: Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed) state, refs :: Disallowed | eff2) Unit, componentDidMount :: Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed) state, refs :: ReactRefs refs | eff3) Unit, componentWillReceiveProps :: props -> Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed) state, refs :: ReactRefs refs | eff4) Unit, shouldComponentUpdate :: props -> state -> Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed) state, refs :: ReactRefs refs | eff5) Boolean, componentWillUpdate :: props -> state -> Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed) state, refs :: ReactRefs refs | eff6) Unit, componentDidUpdate :: props -> state -> Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed) state, refs :: ReactRefs refs | eff7) Unit, componentWillUnmount :: Eff (props :: ReactProps props, state :: ReactState (read :: ReadAllowed) state, refs :: ReactRefs refs | eff8) Unit } |
| 91 | +``` |
| 92 | + |
| 93 | +#### `spec` |
| 94 | + |
| 95 | +``` purescript |
| 96 | +spec :: forall props refs state eff1 eff2 eff3 eff4 eff5 eff6 eff7 eff8. UISpec props refs state eff1 eff2 eff3 eff4 eff5 eff6 eff7 eff8 |
| 97 | +``` |
| 98 | + |
| 99 | +#### `getProps` |
| 100 | + |
| 101 | +``` purescript |
| 102 | +getProps :: forall props eff. Eff (props :: ReactProps props | eff) props |
| 103 | +``` |
| 104 | + |
| 105 | +#### `getRefs` |
| 106 | + |
| 107 | +``` purescript |
| 108 | +getRefs :: forall refs eff. Eff (refs :: ReactRefs refs | eff) refs |
| 109 | +``` |
| 110 | + |
| 111 | +#### `writeState` |
| 112 | + |
| 113 | +``` purescript |
| 114 | +writeState :: forall state statePerms eff. state -> Eff (state :: ReactState (read :: ReadAllowed, write :: WriteAllowed | statePerms) state | eff) state |
| 115 | +``` |
| 116 | + |
| 117 | +#### `readState` |
| 118 | + |
| 119 | +``` purescript |
| 120 | +readState :: forall state statePerms eff. Eff (state :: ReactState (read :: ReadAllowed | statePerms) state | eff) state |
| 121 | +``` |
| 122 | + |
| 123 | +#### `getSelf` |
| 124 | + |
| 125 | +``` purescript |
| 126 | +getSelf :: forall eff. Eff eff (UIRef eff) |
| 127 | +``` |
| 128 | + |
| 129 | +#### `runUI` |
| 130 | + |
| 131 | +``` purescript |
| 132 | +runUI :: forall refEff eff result. UIRef refEff -> Eff refEff result -> Eff eff result |
| 133 | +``` |
| 134 | + |
| 135 | +#### `mkUI` |
| 136 | + |
| 137 | +``` purescript |
| 138 | +mkUI :: forall props refs state eff eff1 eff2 eff3 eff4 eff5 eff6 eff7 eff8. UISpec props refs state eff1 eff2 eff3 eff4 eff5 eff6 eff7 eff8 -> Render props refs state eff -> props -> UI |
| 139 | +``` |
| 140 | + |
| 141 | +#### `DOMEvent` |
| 142 | + |
| 143 | +``` purescript |
| 144 | +type DOMEvent = forall attrs. { | attrs } |
| 145 | +``` |
| 146 | + |
| 147 | +#### `DOMEventTarget` |
| 148 | + |
| 149 | +``` purescript |
| 150 | +type DOMEventTarget = forall attrs. { | attrs } |
| 151 | +``` |
| 152 | + |
| 153 | +#### `Event` |
| 154 | + |
| 155 | +``` purescript |
| 156 | +type Event = { bubbles :: Boolean, cancelable :: Boolean, currentTarget :: DOMEventTarget, defaultPrevented :: Boolean, eventPhase :: Number, isTrusted :: Boolean, nativeEvent :: DOMEvent, preventDefault :: { } -> { }, stopPropagation :: { } -> { }, target :: DOMEventTarget, timeStamp :: Number, eventType :: String } |
| 157 | +``` |
| 158 | + |
| 159 | +#### `MouseEvent` |
| 160 | + |
| 161 | +``` purescript |
| 162 | +type MouseEvent = { pageX :: Number, pageY :: Number } |
| 163 | +``` |
| 164 | + |
| 165 | +#### `KeyboardEvent` |
| 166 | + |
| 167 | +``` purescript |
| 168 | +type KeyboardEvent = { altKey :: Boolean, ctrlKey :: Boolean, charCode :: Number, key :: String, keyCode :: Number, locale :: String, location :: Number, metaKey :: Boolean, repeat :: Boolean, shiftKey :: Boolean, which :: Number } |
| 169 | +``` |
| 170 | + |
| 171 | +#### `EventHandlerContext` |
| 172 | + |
| 173 | +``` purescript |
| 174 | +type EventHandlerContext eff props refs state result = forall statePerms. Eff (props :: ReactProps props, refs :: ReactRefs refs, state :: ReactState (read :: ReadAllowed, write :: WriteAllowed | statePerms) state | eff) result |
| 175 | +``` |
| 176 | + |
| 177 | +#### `handle` |
| 178 | + |
| 179 | +``` purescript |
| 180 | +handle :: forall eff ev props refs state result. (ev -> EventHandlerContext eff props refs state result) -> EventHandler ev |
| 181 | +``` |
| 182 | + |
| 183 | +#### `renderToString` |
| 184 | + |
| 185 | +``` purescript |
| 186 | +renderToString :: UI -> String |
| 187 | +``` |
| 188 | + |
| 189 | +#### `renderToBody` |
| 190 | + |
| 191 | +``` purescript |
| 192 | +renderToBody :: forall eff. UI -> Eff (dom :: DOM | eff) UI |
| 193 | +``` |
| 194 | + |
| 195 | +#### `renderToElementById` |
| 196 | + |
| 197 | +``` purescript |
| 198 | +renderToElementById :: forall eff. String -> UI -> Eff (dom :: DOM | eff) UI |
| 199 | +``` |
| 200 | + |
| 201 | +#### `deferred` |
| 202 | + |
| 203 | +``` purescript |
| 204 | +deferred :: forall a eff. Eff eff a -> Eff eff a |
| 205 | +``` |
| 206 | + |
| 207 | + |
0 commit comments