diff --git a/bower.json b/bower.json index ffb30d8..2a1d79e 100644 --- a/bower.json +++ b/bower.json @@ -17,16 +17,16 @@ "url": "git://github.com/purescript-contrib/purescript-react.git" }, "dependencies": { - "purescript-eff": "^3.0.0", - "purescript-prelude": "^3.0.0", - "purescript-unsafe-coerce": "^3.0.0", - "purescript-exceptions": "^3.1.0", - "purescript-maybe": "^3.0.0", - "purescript-nullable": "^3.0.0", - "purescript-typelevel-prelude": "^2.5.0" + "purescript-effect": "^2.0.0", + "purescript-prelude": "^4.0.0", + "purescript-unsafe-coerce": "^4.0.0", + "purescript-exceptions": "^4.0.0", + "purescript-maybe": "^4.0.0", + "purescript-nullable": "^4.0.0", + "purescript-typelevel-prelude": "^3.0.0" }, "devDependencies": { - "purescript-console": "^3.0.0", - "purescript-psci-support": "^3.0.0" + "purescript-console": "^4.1.0", + "purescript-psci-support": "^4.0.0" } } diff --git a/package.json b/package.json index fe70c4c..cd9473b 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,6 @@ "name": "purescript-react", "files": [], "peerDependencies": { - "react": "^16.0.0" + "react": "^16.3.0" } } diff --git a/src/React.js b/src/React.js index 6e4ec51..db2c58b 100644 --- a/src/React.js +++ b/src/React.js @@ -6,27 +6,38 @@ var React = require("react"); function createClass(baseClass) { function bindProperty(instance, prop, value) { switch (prop) { + case 'state': + case 'render': case 'componentDidMount': - case 'componentDidUpdate': - case 'componentWillMount': case 'componentWillUnmount': - case 'render': - case 'state': instance[prop] = value; break; - case 'componentWillReceiveProps': - instance[prop] = function (a) { return value(a)(); }; - break; - case 'componentDidCatch': case 'componentWillUpdate': case 'shouldComponentUpdate': + case 'getSnapshotBeforeUpdate': instance[prop] = function (a, b) { return value(a)(b)(); }; break; + case 'componentDidUpdate': + instance[prop] = function (a, b, c) { return value(a)(b)(c)(); }; + break; + + case 'unsafeComponentWillMount': + instance['UNSAFE_componentWillMount'] = value; + break; + + case 'unsafeComponentWillReceiveProps': + instance['UNSAFE_componentWillReceiveProps'] = function (a) { return value(a)(); }; + break; + + case 'unsafeComponentWillUpdate': + instance['UNSAFE_componentWillUpdate'] = function (a, b) { return value(a)(b)(); }; + break; + default: - throw new Error('Not a component property: ' + prop); + throw new Error('[purescript-react] Not a component property: ' + prop); } } @@ -49,9 +60,25 @@ function createClass(baseClass) { }; } -exports.componentImpl = createClass(React.Component); +function createClassWithDerivedState(classCtr) { + return function(displayName) { + return function(getDerivedStateFromProps) { + return function(ctrFn) { + var Constructor = componentImpl(displayName)(ctrFn); + Constructor.getDerivedStateFromProps = function(a, b) { return getDerivedStateFromProps(a)(b) }; + return Constructor; + }; + }; + }; +} -exports.pureComponentImpl = createClass(React.PureComponent); +var componentImpl = createClass(React.Component); +exports.componentImpl = componentImpl; +exports.componentWithDerivedStateImpl = createClassWithDerivedState(componentImpl); + +var pureComponentImpl = createClass(React.PureComponent); +exports.pureComponentImpl = pureComponentImpl +exports.pureComponentWithDerivedStateImpl = createClassWithDerivedState(pureComponentImpl); exports.statelessComponent = function(x) { return x; }; @@ -68,60 +95,44 @@ exports.childrenToArray = React.Children.toArray exports.childrenCount = React.Children.count; -function writeState(this_) { +function setStateImpl(this_) { return function(state){ return function(){ this_.setState(state); - return state; }; }; } -exports.writeState = writeState; +exports.setStateImpl = setStateImpl; -function writeStateWithCallback(this_, cb) { +function setStateWithCallbackImpl(this_) { return function(state){ return function(cb){ return function() { this_.setState(state, cb); - return state; }; }; }; } -exports.writeStateWithCallback = writeStateWithCallback; +exports.setStateWithCallbackImpl = setStateWithCallbackImpl; -function readState(this_) { +function getState(this_) { return function(){ + if (!this_.state) { + throw new Error('[purescript-react] Cannot get state within constructor'); + } return this_.state; }; } -exports.readState = readState; +exports.getState = getState; -function transformState(this_){ - return function(update){ - return function(){ - this_.setState(function(old, props){ - return update(old); - }); +function forceUpdateWithCallback(this_) { + return function(cb) { + return function() { + this_.forceUpdate(cb); }; }; } -exports.transformState = transformState; - -function forceUpdateCbImpl(this_, cb) { - this_.forceUpdate(function() { - return cb(); - }); - return {}; -}; -exports.forceUpdateCbImpl = forceUpdateCbImpl; - -function handle(f) { - return function(e){ - return f(e)(); - }; -}; -exports.handle = handle; +exports.forceUpdateWithCallback = forceUpdateWithCallback; function createElement(class_) { return function(props){ @@ -149,3 +160,12 @@ function createElementDynamic(class_) { }; exports.createElementDynamicImpl = createElementDynamic; exports.createElementTagNameDynamic = createElementDynamic; + +function createContext(defaultValue) { + var context = React.createContext(defaultValue); + return { + consumer: context.Consumer, + provider: context.Provider + }; +} +exports.createContext = createContext; diff --git a/src/React.purs b/src/React.purs index 571f6ba..9776211 100644 --- a/src/React.purs +++ b/src/React.purs @@ -4,17 +4,9 @@ module React ( ReactElement , ReactComponent , ReactThis + , ReactUnusedSnapshot , TagName - , Read - , Write - , Disallowed - , ReadWrite - , ReadOnly - - , ReactState - , ReactProps - , Render , ComponentWillMount , ComponentDidMount @@ -26,30 +18,38 @@ module React , ComponentWillUnmount , ReactClass - , Ref + , ReactRef + , class ReactComponentSpec + , class ReactPureComponentSpec , component + , componentWithDerivedState , pureComponent + , pureComponentWithDerivedState , statelessComponent , getProps - , readState + , getState + , setState + , setStateWithCallback , writeState , writeStateWithCallback - , transformState + , modifyState + , modifyStateWithCallback , forceUpdate - , forceUpdateCb + , forceUpdateWithCallback , createElement + , unsafeCreateElement , createElementDynamic + , unsafeCreateElementDynamic + , createLeafElement + , unsafeCreateLeafElement , createElementTagName , createElementTagNameDynamic - , createLeafElement , SyntheticEventHandler - , SyntheticEventHandlerContext - , handle , Children , childrenToArray @@ -60,19 +60,20 @@ module React , toElement , fragmentWithKey - , module SyntheticEvent + , Context + , ContextProvider + , ContextConsumer + , createContext ) where import Prelude -import Control.Monad.Eff (kind Effect, Eff) -import Control.Monad.Eff.Exception (Error) -import Control.Monad.Eff.Uncurried (EffFn2, runEffFn2) - import Data.Nullable (Nullable) - -import React.SyntheticEvent as SyntheticEvent - +import Effect (Effect) +import Effect.Exception (Error) +import Effect.Uncurried (EffectFn1) +import Prim.Row as Row +import Type.Row (type (+)) import Unsafe.Coerce (unsafeCoerce) -- | Name of a tag. @@ -81,192 +82,165 @@ type TagName = String -- | A virtual DOM node, or component. foreign import data ReactElement :: Type +instance semigroupReactElement :: Semigroup ReactElement where + append a b = toElement [ a, b ] + +instance monoidReactElement :: Monoid ReactElement where + mempty = toElement ([] :: Array ReactElement) + -- | A mounted react component foreign import data ReactComponent :: Type -- | A reference to a component, essentially React's `this`. foreign import data ReactThis :: Type -> Type -> Type --- | An event handler. The type argument represents the type of the event. -foreign import data SyntheticEventHandler :: Type -> Type - --- | This phantom type indicates that read access to a resource is allowed. -foreign import data Read :: Effect - --- | This phantom type indicates that write access to a resource is allowed. -foreign import data Write :: Effect - --- | An access synonym which indicates that neither read nor write access are allowed. -type Disallowed = () :: # Effect - --- | An access synonym which indicates that both read and write access are allowed. -type ReadWrite = (read :: Read, write :: Write) - --- | An access synonym which indicates that reads are allowed but writes are not. -type ReadOnly = (read :: Read) - --- | This effect indicates that a computation may read or write the component state. --- | --- | The first type argument is a row of access types (`Read`, `Write`). -foreign import data ReactState :: # Effect -> Effect - --- | This effect indicates that a computation may read the component props. -foreign import data ReactProps :: Effect - --- | A function which handles events. -type SyntheticEventHandlerContext eff props state result = - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) result - --- | A render function. -type Render eff = - Eff - ( props :: ReactProps - , state :: ReactState ReadOnly - | eff - ) ReactElement - --- | A component will mount function. -type ComponentWillMount eff = - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Unit - --- | A component did mount function. -type ComponentDidMount eff = - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Unit - -type ComponentDidCatch eff = - Error -> - { componentStack :: String } -> - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Unit +foreign import data ReactUnusedSnapshot :: Type + +type SyntheticEventHandler event = EffectFn1 event Unit + +-- | A render effect. +type Render = Effect ReactElement + +-- | A component will mount effect. +type ComponentWillMount = Effect Unit + +-- | A component did mount effect. +type ComponentDidMount = Effect Unit + +-- | A component did catch effect. +type ComponentDidCatch = Error -> { componentStack :: String } -> Effect Unit -- | A component will receive props function. -type ComponentWillReceiveProps props eff = - props -> - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Unit +type ComponentWillReceiveProps props = props -> Effect Unit -- | A should component update function. -type ShouldComponentUpdate props state eff = - props -> - state -> - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Boolean +type ShouldComponentUpdate props state = props -> state -> Effect Boolean -- | A component will update function. -type ComponentWillUpdate props state eff = - props -> - state -> - Eff - ( props :: ReactProps - , state :: ReactState ReadWrite - | eff - ) Unit +type ComponentWillUpdate props state = props -> state -> Effect Unit -- | A component did update function. -type ComponentDidUpdate props state eff = - props -> - state -> - Eff - ( props :: ReactProps - , state :: ReactState ReadOnly - | eff - ) Unit - --- | A component will unmount function. -type ComponentWillUnmount eff = - Eff - ( props :: ReactProps - , state :: ReactState ReadOnly - | eff - ) Unit +type ComponentDidUpdate props state snapshot = props -> state -> snapshot -> Effect Unit + +type GetSnapshotBeforeUpdate props state snapshot = props -> state -> Effect snapshot + +-- | A component will unmount effect. +type ComponentWillUnmount = Effect Unit -- | Required fields for constructing a ReactClass. -type ReactSpecRequired state eff r = +type ReactSpecRequired state r = ( state :: state - , render :: Render eff + , render :: Render | r ) --- | Optional fields for constructing a ReactClass. -type ReactSpecOptional props state eff r = - ( componentWillMount :: ComponentWillMount eff - , componentDidMount :: ComponentDidMount eff - , componentDidCatch :: ComponentDidCatch eff - , componentWillReceiveProps :: ComponentWillReceiveProps props eff - , componentWillUpdate :: ComponentWillUpdate props state eff - , componentDidUpdate :: ComponentDidUpdate props state eff - , componentWillUnmount :: ComponentWillUnmount eff +type ReactSpecUnsafe props state r = + ( unsafeComponentWillMount :: ComponentWillMount + , unsafeComponentWillReceiveProps :: ComponentWillReceiveProps props + , unsafeComponentWillUpdate :: ComponentWillUpdate props state | r ) -type ReactSpecShouldComponentUpdate props state eff = - ( shouldComponentUpdate :: ShouldComponentUpdate props state eff +-- | Optional fields for constructing a ReactClass. +type ReactSpecOptional props state snapshot r = + ( componentDidMount :: ComponentDidMount + , componentDidCatch :: ComponentDidCatch + , componentWillUnmount :: ComponentWillUnmount + , componentDidUpdate :: ComponentDidUpdate props state snapshot + , getSnapshotBeforeUpdate :: GetSnapshotBeforeUpdate props state snapshot + | ReactSpecUnsafe props state r + ) + +type ReactSpecShouldComponentUpdate props state = + ( shouldComponentUpdate :: ShouldComponentUpdate props state ) -type ReactSpecAll props state eff = - ReactSpecRequired state eff (ReactSpecOptional props state eff (ReactSpecShouldComponentUpdate props state eff)) +type ReactSpecAll props state snapshot + = ReactSpecRequired state + + ReactSpecOptional props state snapshot + + ReactSpecShouldComponentUpdate props state -type ReactSpecPure props state eff = - ReactSpecRequired state eff (ReactSpecOptional props state eff ()) +type ReactSpecPure props state snapshot + = ReactSpecRequired state + + ReactSpecOptional props state snapshot () -- | The signature for a ReactClass constructor. A constructor takes the -- | `ReactThis` context and returns a record with appropriate lifecycle -- | methods. -type ReactClassConstructor props state eff r = +type ReactClassConstructor props state r = ReactThis props state -> - Eff - ( props :: ReactProps - , state :: ReactState Disallowed - | eff - ) (Record (ReactSpecRequired state eff r)) + Effect (Record r) + +class ReactComponentSpec props state snapshot (given :: # Type) (spec :: # Type) + +instance reactComponentSpec :: + ( Row.Union given (ReactSpecAll props state ReactUnusedSnapshot) spec + , Row.Nub spec (ReactSpecAll props state snapshot) + ) => + ReactComponentSpec props state snapshot given spec + +class ReactPureComponentSpec props state snapshot (given :: # Type) (spec :: # Type) + +instance reactPureComponentSpec :: + ( Row.Union given (ReactSpecPure props state ReactUnusedSnapshot) spec + , Row.Nub spec (ReactSpecPure props state snapshot) + ) => + ReactPureComponentSpec props state snapshot given spec -- | Creates a `ReactClass`` inherited from `React.Component`. -component - :: forall props state eff r x - . Union (ReactSpecRequired (Record state) eff r) x (ReactSpecAll (Record props) (Record state) eff) - => String - -> ReactClassConstructor (Record props) (Record state) eff r - -> ReactClass (Record props) +component :: forall props state snapshot given spec. + ReactComponentSpec (Record props) (Record state) snapshot given spec => + String -> + ReactClassConstructor (Record props) (Record state) given -> + ReactClass (Record props) component = componentImpl +-- | Like `component`, but takes a `getDerivedStateFromProps` handler. +componentWithDerivedState :: forall props state snapshot given spec. + ReactComponentSpec (Record props) (Record state) snapshot given spec => + String -> + (Record props -> Record state -> Record state) -> + ReactClassConstructor (Record props) (Record state) given -> + ReactClass (Record props) +componentWithDerivedState = componentWithDerivedStateImpl + -- | Creates a `ReactClass`` inherited from `React.PureComponent`. -pureComponent - :: forall props state eff r x - . Union (ReactSpecRequired (Record state) eff r) x (ReactSpecPure (Record props) (Record state) eff) - => String - -> ReactClassConstructor (Record props) (Record state) eff r - -> ReactClass (Record props) +pureComponent :: forall props state snapshot given spec. + ReactPureComponentSpec (Record props) (Record state) snapshot given spec => + String -> + ReactClassConstructor (Record props) (Record state) given -> + ReactClass (Record props) pureComponent = pureComponentImpl -foreign import componentImpl :: forall this props eff r. +-- | Like `pureComponent`, but takes a `getDerivedStateFromProps` handler. +pureComponentWithDerivedState :: forall props state snapshot given spec. + ReactPureComponentSpec (Record props) (Record state) snapshot given spec => + String -> + (Record props -> Record state -> Record state) -> + ReactClassConstructor (Record props) (Record state) given -> + ReactClass (Record props) +pureComponentWithDerivedState = componentWithDerivedStateImpl + +foreign import componentImpl :: forall this props r. + String -> + (this -> Effect r) -> + ReactClass props + +foreign import componentWithDerivedStateImpl :: forall this props state r. + String -> + (props -> state -> state) -> + (this -> Effect r) -> + ReactClass props + +foreign import pureComponentImpl :: forall this props r. String -> - (this -> Eff eff r) -> + (this -> Effect r) -> ReactClass props -foreign import pureComponentImpl :: forall this props eff r. +foreign import pureComponentWithDerivedStateImpl :: forall this props state r. String -> - (this -> Eff eff r) -> + (props -> state -> state) -> + (this -> Effect r) -> ReactClass props foreign import statelessComponent :: forall props. @@ -280,67 +254,99 @@ foreign import fragment :: ReactClass { children :: Children } -- | Type for React refs. This type is opaque, but you can use `Data.Foreign` -- | and `DOM` to validate the underlying representation. -foreign import data Ref :: Type +foreign import data ReactRef :: Type -- | Read the component props. -foreign import getProps :: forall props state eff. +foreign import getProps :: forall props state. ReactThis props state -> - Eff (props :: ReactProps | eff) props + Effect props --- | Write the component state. -foreign import writeState :: forall props state access eff. +foreign import setStateImpl :: forall props state update. ReactThis props state -> - state -> - Eff (state :: ReactState (write :: Write | access) | eff) state + update -> + Effect Unit --- | Write the component state with a callback. -foreign import writeStateWithCallback :: forall props state access eff. +foreign import setStateWithCallbackImpl :: forall props state update. ReactThis props state -> - state -> - Eff (state :: ReactState (write :: Write | access) | eff) Unit -> Eff (state :: ReactState (write :: Write | access) | eff) state + update -> + Effect Unit -> + Effect Unit --- | Read the component state. -foreign import readState :: forall props state access eff. +-- | Get the component state. +foreign import getState :: forall props state. + ReactThis props state -> + Effect state + +-- | Update component state given some sub-set of state properties. +setState :: forall props given rest all. + Row.Union given rest all => + ReactThis props (Record all) -> + Record given -> + Effect Unit +setState = setStateImpl + +-- | Update component state given some sub-set of state properties, while +-- | also invoking a callback when applied. +setStateWithCallback :: forall props given rest all. + Row.Union given rest all => + ReactThis props (Record all) -> + Record given -> + Effect Unit -> + Effect Unit +setStateWithCallback = setStateWithCallbackImpl + +-- | Update component state. +writeState :: forall props all. + ReactThis props (Record all) -> + Record all -> + Effect Unit +writeState = setStateImpl + +-- | Update component state, while also invoking a callback when applied. +writeStateWithCallback :: forall props all. + ReactThis props (Record all) -> + Record all -> + Effect Unit -> + Effect Unit +writeStateWithCallback = setStateWithCallbackImpl + +-- | Update component state given a modification function. +modifyState :: forall props state. ReactThis props state -> - Eff (state :: ReactState (read :: Read | access) | eff) state + (state -> state) -> + Effect Unit +modifyState = setStateImpl --- | Transform the component state by applying a function. -foreign import transformState :: forall props state eff. +-- | Update component state given a modification function, while also invoking +-- | a callback when applied. +modifyStateWithCallback :: forall props state. ReactThis props state -> (state -> state) -> - Eff (state :: ReactState ReadWrite | eff) Unit + Effect Unit -> + Effect Unit +modifyStateWithCallback = setStateWithCallbackImpl -- | Force render of a react component. -forceUpdate :: forall eff props state. - ReactThis props state -> Eff eff Unit -forceUpdate this = forceUpdateCb this (pure unit) - -foreign import forceUpdateCbImpl :: forall eff e props state. - EffFn2 eff - (ReactThis props state) - (Eff e Unit) - Unit +forceUpdate :: forall props state. ReactThis props state -> Effect Unit +forceUpdate this = forceUpdateWithCallback this (pure unit) --- | Force render and then run an Eff computation. -forceUpdateCb :: forall eff props state. - ReactThis props state -> Eff eff Unit -> Eff eff Unit -forceUpdateCb this m = runEffFn2 forceUpdateCbImpl this m - --- | Create an event handler. -foreign import handle :: forall eff ev props state result. - (ev -> SyntheticEventHandlerContext eff props state result) -> SyntheticEventHandler ev +-- | Force render and then run an Effect. +foreign import forceUpdateWithCallback :: forall props state. + ReactThis props state -> + Effect Unit -> + Effect Unit class ReactPropFields (required :: # Type) (given :: # Type) type ReservedReactPropFields r = ( key :: String - , ref :: SyntheticEventHandler (Nullable Ref) + , ref :: SyntheticEventHandler (Nullable ReactRef) | r ) instance reactPropFields :: - ( Union given optional (ReservedReactPropFields required) - , Union optional leftover (ReservedReactPropFields ()) + ( Row.Union given optional (ReservedReactPropFields required) + , Row.Union optional leftover (ReservedReactPropFields ()) ) => ReactPropFields required given @@ -353,6 +359,15 @@ createElement :: forall required given. ReactElement createElement = createElementImpl +-- | An unsafe version of `createElement` which does not enforce the reserved +-- | properties "key" and "ref". +unsafeCreateElement :: forall props. + ReactClass { children :: Children | props } -> + { | props } -> + Array ReactElement -> + ReactElement +unsafeCreateElement = createElementImpl + -- | Create an element from a React class passing the children array. Used for a dynamic array of children. createElementDynamic :: forall required given. ReactPropFields required given => @@ -362,6 +377,15 @@ createElementDynamic :: forall required given. ReactElement createElementDynamic = createElementDynamicImpl +-- | An unsafe version of `createElementDynamic` which does not enforce the reserved +-- | properties "key" and "ref". +unsafeCreateElementDynamic :: forall props. + ReactClass { children :: Children | props } -> + { | props } -> + Array ReactElement -> + ReactElement +unsafeCreateElementDynamic = createElementDynamicImpl + foreign import createElementImpl :: forall required given children. ReactClass required -> given -> Array children -> ReactElement @@ -376,6 +400,14 @@ createLeafElement :: forall required given. ReactElement createLeafElement = createLeafElementImpl +-- | An unsafe version of `createLeafElement` which does not enforce the reserved +-- | properties "key" and "ref". +unsafeCreateLeafElement :: forall props. + ReactClass props -> + props -> + ReactElement +unsafeCreateLeafElement = createLeafElementImpl + foreign import createLeafElementImpl :: forall required given. ReactClass required -> given -> ReactElement @@ -412,7 +444,7 @@ instance isReactElementChildren :: IsReactElement Children where toElement = unsafeCoerce instance isReactElementReactElement :: IsReactElement ReactElement where - toElement = id + toElement = identity instance isReactElementArray :: IsReactElement (Array ReactElement) where toElement = createElement fragment {} @@ -420,3 +452,15 @@ instance isReactElementArray :: IsReactElement (Array ReactElement) where -- | Creates a keyed fragment. fragmentWithKey :: String -> Array ReactElement -> ReactElement fragmentWithKey = createElement fragment <<< { key: _ } + +type Context a = + { consumer :: ContextConsumer a + , provider :: ContextProvider a + } + +type ContextProvider a = ReactClass { children :: Children, value :: a } + +type ContextConsumer a = ReactClass { children :: a -> ReactElement } + +-- | Create a new context provider/consumer pair given a default value. +foreign import createContext :: forall a. a -> Context a diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 167ca73..e3b2b50 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -1,14 +1,13 @@ module React.DOM.Props where -import Data.Nullable (Nullable) - -import React - ( Ref - , handle +import Prelude - , SyntheticEventHandlerContext - - , SyntheticEvent +import Data.Nullable (Nullable) +import Effect (Effect) +import Effect.Uncurried (mkEffectFn1) +import React (ReactRef) +import React.SyntheticEvent + ( SyntheticEvent , SyntheticAnimationEvent , SyntheticClipboardEvent , SyntheticCompositionEvent @@ -481,561 +480,422 @@ security = unsafeMkProps "security" unselectable :: Boolean -> Props unselectable = unsafeMkProps "unselectable" -onAnimationStart :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f) +onAnimationStart :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationStart f = unsafeMkProps "onAnimationStart" (mkEffectFn1 f) -onAnimationEnd :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f) +onAnimationEnd :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationEnd f = unsafeMkProps "onAnimationEnd" (mkEffectFn1 f) -onAnimationIteration :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) +onAnimationIteration :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationIteration f = unsafeMkProps "onAnimationIteration" (mkEffectFn1 f) -onTransitionEnd :: forall eff props state result. - (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) +onTransitionEnd :: (SyntheticTransitionEvent -> Effect Unit) -> Props +onTransitionEnd f = unsafeMkProps "onTransitionEnd" (mkEffectFn1 f) -onToggle :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onToggle f = unsafeMkProps "onToggle" (handle f) +onToggle :: (SyntheticEvent -> Effect Unit) -> Props +onToggle f = unsafeMkProps "onToggle" (mkEffectFn1 f) -onError :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onError f = unsafeMkProps "onError" (handle f) +onError :: (SyntheticEvent -> Effect Unit) -> Props +onError f = unsafeMkProps "onError" (mkEffectFn1 f) -onLoad :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoad f = unsafeMkProps "onLoad" (handle f) +onLoad :: (SyntheticEvent -> Effect Unit) -> Props +onLoad f = unsafeMkProps "onLoad" (mkEffectFn1 f) -onAbort :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAbort f = unsafeMkProps "onAbort" (handle f) +onAbort :: (SyntheticEvent -> Effect Unit) -> Props +onAbort f = unsafeMkProps "onAbort" (mkEffectFn1 f) -onCanPlay :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCanPlay f = unsafeMkProps "onCanPlay" (handle f) +onCanPlay :: (SyntheticEvent -> Effect Unit) -> Props +onCanPlay f = unsafeMkProps "onCanPlay" (mkEffectFn1 f) -onCanPlayThrough :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCanPlayThrough f = unsafeMkProps "onCanPlayThrough" (handle f) +onCanPlayThrough :: (SyntheticEvent -> Effect Unit) -> Props +onCanPlayThrough f = unsafeMkProps "onCanPlayThrough" (mkEffectFn1 f) -onDurationChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDurationChange f = unsafeMkProps "onDurationChange" (handle f) +onDurationChange :: (SyntheticEvent -> Effect Unit) -> Props +onDurationChange f = unsafeMkProps "onDurationChange" (mkEffectFn1 f) -onEmptied :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEmptied f = unsafeMkProps "onEmptied" (handle f) +onEmptied :: (SyntheticEvent -> Effect Unit) -> Props +onEmptied f = unsafeMkProps "onEmptied" (mkEffectFn1 f) -onEncrypted :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEncrypted f = unsafeMkProps "onEncrypted" (handle f) +onEncrypted :: (SyntheticEvent -> Effect Unit) -> Props +onEncrypted f = unsafeMkProps "onEncrypted" (mkEffectFn1 f) -onEnded :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEnded f = unsafeMkProps "onEnded" (handle f) +onEnded :: (SyntheticEvent -> Effect Unit) -> Props +onEnded f = unsafeMkProps "onEnded" (mkEffectFn1 f) -onLoadedData :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadedData f = unsafeMkProps "onLoadedData" (handle f) +onLoadedData :: (SyntheticEvent -> Effect Unit) -> Props +onLoadedData f = unsafeMkProps "onLoadedData" (mkEffectFn1 f) -onLoadedMetadata :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadedMetadata f = unsafeMkProps "onLoadedMetadata" (handle f) +onLoadedMetadata :: (SyntheticEvent -> Effect Unit) -> Props +onLoadedMetadata f = unsafeMkProps "onLoadedMetadata" (mkEffectFn1 f) -onLoadStart :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadStart f = unsafeMkProps "onLoadStart" (handle f) +onLoadStart :: (SyntheticEvent -> Effect Unit) -> Props +onLoadStart f = unsafeMkProps "onLoadStart" (mkEffectFn1 f) -onPause :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPause f = unsafeMkProps "onPause" (handle f) +onPause :: (SyntheticEvent -> Effect Unit) -> Props +onPause f = unsafeMkProps "onPause" (mkEffectFn1 f) -onPlay :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPlay f = unsafeMkProps "onPlay" (handle f) +onPlay :: (SyntheticEvent -> Effect Unit) -> Props +onPlay f = unsafeMkProps "onPlay" (mkEffectFn1 f) -onPlaying :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPlaying f = unsafeMkProps "onPlaying" (handle f) +onPlaying :: (SyntheticEvent -> Effect Unit) -> Props +onPlaying f = unsafeMkProps "onPlaying" (mkEffectFn1 f) -onProgress :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onProgress f = unsafeMkProps "onProgress" (handle f) +onProgress :: (SyntheticEvent -> Effect Unit) -> Props +onProgress f = unsafeMkProps "onProgress" (mkEffectFn1 f) -onRateChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onRateChange f = unsafeMkProps "onRateChange" (handle f) +onRateChange :: (SyntheticEvent -> Effect Unit) -> Props +onRateChange f = unsafeMkProps "onRateChange" (mkEffectFn1 f) -onSeeked :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSeeked f = unsafeMkProps "onSeeked" (handle f) +onSeeked :: (SyntheticEvent -> Effect Unit) -> Props +onSeeked f = unsafeMkProps "onSeeked" (mkEffectFn1 f) -onSeeking :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSeeking f = unsafeMkProps "onSeeking" (handle f) +onSeeking :: (SyntheticEvent -> Effect Unit) -> Props +onSeeking f = unsafeMkProps "onSeeking" (mkEffectFn1 f) -onStalled :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onStalled f = unsafeMkProps "onStalled" (handle f) +onStalled :: (SyntheticEvent -> Effect Unit) -> Props +onStalled f = unsafeMkProps "onStalled" (mkEffectFn1 f) -onSuspend :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSuspend f = unsafeMkProps "onSuspend" (handle f) +onSuspend :: (SyntheticEvent -> Effect Unit) -> Props +onSuspend f = unsafeMkProps "onSuspend" (mkEffectFn1 f) -onTimeUpdate :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTimeUpdate f = unsafeMkProps "onTimeUpdate" (handle f) +onTimeUpdate :: (SyntheticEvent -> Effect Unit) -> Props +onTimeUpdate f = unsafeMkProps "onTimeUpdate" (mkEffectFn1 f) -onVolumeChange :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onVolumeChange f = unsafeMkProps "onVolumeChange" (handle f) +onVolumeChange :: (SyntheticEvent -> Effect Unit) -> Props +onVolumeChange f = unsafeMkProps "onVolumeChange" (mkEffectFn1 f) -onWaiting :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onWaiting f = unsafeMkProps "onWaiting" (handle f) +onWaiting :: (SyntheticEvent -> Effect Unit) -> Props +onWaiting f = unsafeMkProps "onWaiting" (mkEffectFn1 f) -onCopy :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCopy f = unsafeMkProps "onCopy" (handle f) +onCopy :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onCopy f = unsafeMkProps "onCopy" (mkEffectFn1 f) -onCut :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCut f = unsafeMkProps "onCut" (handle f) +onCut :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onCut f = unsafeMkProps "onCut" (mkEffectFn1 f) -onPaste :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPaste f = unsafeMkProps "onPaste" (handle f) +onPaste :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onPaste f = unsafeMkProps "onPaste" (mkEffectFn1 f) -onCompositionEnd :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionEnd f = unsafeMkProps "onCompositionEnd" (handle f) +onCompositionEnd :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionEnd f = unsafeMkProps "onCompositionEnd" (mkEffectFn1 f) -onCompositionStart :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionStart f = unsafeMkProps "onCompositionStart" (handle f) +onCompositionStart :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionStart f = unsafeMkProps "onCompositionStart" (mkEffectFn1 f) -onCompositionUpdate :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionUpdate f = unsafeMkProps "onCompositionUpdate" (handle f) +onCompositionUpdate :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionUpdate f = unsafeMkProps "onCompositionUpdate" (mkEffectFn1 f) -onKeyDown :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyDown f = unsafeMkProps "onKeyDown" (handle f) +onKeyDown :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyDown f = unsafeMkProps "onKeyDown" (mkEffectFn1 f) -onKeyPress :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyPress f = unsafeMkProps "onKeyPress" (handle f) +onKeyPress :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyPress f = unsafeMkProps "onKeyPress" (mkEffectFn1 f) -onKeyUp :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyUp f = unsafeMkProps "onKeyUp" (handle f) +onKeyUp :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyUp f = unsafeMkProps "onKeyUp" (mkEffectFn1 f) -onFocus :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onFocus f = unsafeMkProps "onFocus" (handle f) +onFocus :: (SyntheticFocusEvent -> Effect Unit) -> Props +onFocus f = unsafeMkProps "onFocus" (mkEffectFn1 f) -onBlur :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onBlur f = unsafeMkProps "onBlur" (handle f) +onBlur :: (SyntheticFocusEvent -> Effect Unit) -> Props +onBlur f = unsafeMkProps "onBlur" (mkEffectFn1 f) -onChange :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onChange f = unsafeMkProps "onChange" (handle f) +onChange :: (SyntheticInputEvent -> Effect Unit) -> Props +onChange f = unsafeMkProps "onChange" (mkEffectFn1 f) -onInput :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onInput f = unsafeMkProps "onInput" (handle f) +onInput :: (SyntheticInputEvent -> Effect Unit) -> Props +onInput f = unsafeMkProps "onInput" (mkEffectFn1 f) -onInvalid :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onInvalid f = unsafeMkProps "onInvalid" (handle f) +onInvalid :: (SyntheticInputEvent -> Effect Unit) -> Props +onInvalid f = unsafeMkProps "onInvalid" (mkEffectFn1 f) -onSubmit :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSubmit f = unsafeMkProps "onSubmit" (handle f) +onSubmit :: (SyntheticInputEvent -> Effect Unit) -> Props +onSubmit f = unsafeMkProps "onSubmit" (mkEffectFn1 f) -onClick :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onClick f = unsafeMkProps "onClick" (handle f) +onClick :: (SyntheticMouseEvent -> Effect Unit) -> Props +onClick f = unsafeMkProps "onClick" (mkEffectFn1 f) -onContextMenu :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onContextMenu f = unsafeMkProps "onContextMenu" (handle f) +onContextMenu :: (SyntheticMouseEvent -> Effect Unit) -> Props +onContextMenu f = unsafeMkProps "onContextMenu" (mkEffectFn1 f) -onDoubleClick :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDoubleClick f = unsafeMkProps "onDoubleClick" (handle f) +onDoubleClick :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDoubleClick f = unsafeMkProps "onDoubleClick" (mkEffectFn1 f) -onDrag :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDrag f = unsafeMkProps "onDrag" (handle f) +onDrag :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDrag f = unsafeMkProps "onDrag" (mkEffectFn1 f) -onDragEnd :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragEnd f = unsafeMkProps "onDragEnd" (handle f) +onDragEnd :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragEnd f = unsafeMkProps "onDragEnd" (mkEffectFn1 f) -onDragEnter :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragEnter f = unsafeMkProps "onDragEnter" (handle f) +onDragEnter :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragEnter f = unsafeMkProps "onDragEnter" (mkEffectFn1 f) -onDragExit :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragExit f = unsafeMkProps "onDragExit" (handle f) +onDragExit :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragExit f = unsafeMkProps "onDragExit" (mkEffectFn1 f) -onDragLeave :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragLeave f = unsafeMkProps "onDragLeave" (handle f) +onDragLeave :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragLeave f = unsafeMkProps "onDragLeave" (mkEffectFn1 f) -onDragOver :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragOver f = unsafeMkProps "onDragOver" (handle f) +onDragOver :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragOver f = unsafeMkProps "onDragOver" (mkEffectFn1 f) -onDragStart :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragStart f = unsafeMkProps "onDragStart" (handle f) +onDragStart :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragStart f = unsafeMkProps "onDragStart" (mkEffectFn1 f) -onDrop :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDrop f = unsafeMkProps "onDrop" (handle f) +onDrop :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDrop f = unsafeMkProps "onDrop" (mkEffectFn1 f) -onMouseDown :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseDown f = unsafeMkProps "onMouseDown" (handle f) +onMouseDown :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseDown f = unsafeMkProps "onMouseDown" (mkEffectFn1 f) -onMouseEnter :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseEnter f = unsafeMkProps "onMouseEnter" (handle f) +onMouseEnter :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseEnter f = unsafeMkProps "onMouseEnter" (mkEffectFn1 f) -onMouseLeave :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseLeave f = unsafeMkProps "onMouseLeave" (handle f) +onMouseLeave :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseLeave f = unsafeMkProps "onMouseLeave" (mkEffectFn1 f) -onMouseMove :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseMove f = unsafeMkProps "onMouseMove" (handle f) +onMouseMove :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseMove f = unsafeMkProps "onMouseMove" (mkEffectFn1 f) -onMouseOut :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseOut f = unsafeMkProps "onMouseOut" (handle f) +onMouseOut :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseOut f = unsafeMkProps "onMouseOut" (mkEffectFn1 f) -onMouseOver :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseOver f = unsafeMkProps "onMouseOver" (handle f) +onMouseOver :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseOver f = unsafeMkProps "onMouseOver" (mkEffectFn1 f) -onMouseUp :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseUp f = unsafeMkProps "onMouseUp" (handle f) +onMouseUp :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseUp f = unsafeMkProps "onMouseUp" (mkEffectFn1 f) -onSelect :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSelect f = unsafeMkProps "onSelect" (handle f) +onSelect :: (SyntheticEvent -> Effect Unit) -> Props +onSelect f = unsafeMkProps "onSelect" (mkEffectFn1 f) -onTouchCancel :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchCancel f = unsafeMkProps "onTouchCancel" (handle f) +onTouchCancel :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchCancel f = unsafeMkProps "onTouchCancel" (mkEffectFn1 f) -onTouchEnd :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchEnd f = unsafeMkProps "onTouchEnd" (handle f) +onTouchEnd :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchEnd f = unsafeMkProps "onTouchEnd" (mkEffectFn1 f) -onTouchMove :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchMove f = unsafeMkProps "onTouchMove" (handle f) +onTouchMove :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchMove f = unsafeMkProps "onTouchMove" (mkEffectFn1 f) -onTouchStart :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchStart f = unsafeMkProps "onTouchStart" (handle f) +onTouchStart :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchStart f = unsafeMkProps "onTouchStart" (mkEffectFn1 f) -onScroll :: forall eff props state result. - (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onScroll f = unsafeMkProps "onScroll" (handle f) +onScroll :: (SyntheticUIEvent -> Effect Unit) -> Props +onScroll f = unsafeMkProps "onScroll" (mkEffectFn1 f) -onWheel :: forall eff props state result. - (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onWheel f = unsafeMkProps "onWheel" (handle f) +onWheel :: (SyntheticWheelEvent -> Effect Unit) -> Props +onWheel f = unsafeMkProps "onWheel" (mkEffectFn1 f) -onAnimationStartCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationStartCapture f = unsafeMkProps "onAnimationStartCapture" (handle f) +onAnimationStartCapture :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationStartCapture f = unsafeMkProps "onAnimationStartCapture" (mkEffectFn1 f) -onAnimationEndCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationEndCapture f = unsafeMkProps "onAnimationEndCapture" (handle f) +onAnimationEndCapture :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationEndCapture f = unsafeMkProps "onAnimationEndCapture" (mkEffectFn1 f) -onAnimationIterationCapture :: forall eff props state result. - (SyntheticAnimationEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAnimationIterationCapture f = unsafeMkProps "onAnimationIterationCapture" (handle f) +onAnimationIterationCapture :: (SyntheticAnimationEvent -> Effect Unit) -> Props +onAnimationIterationCapture f = unsafeMkProps "onAnimationIterationCapture" (mkEffectFn1 f) -onTransitionEndCapture :: forall eff props state result. - (SyntheticTransitionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTransitionEndCapture f = unsafeMkProps "onTransitionEndCapture" (handle f) +onTransitionEndCapture :: (SyntheticTransitionEvent -> Effect Unit) -> Props +onTransitionEndCapture f = unsafeMkProps "onTransitionEndCapture" (mkEffectFn1 f) -onToggleCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onToggleCapture f = unsafeMkProps "onToggleCapture" (handle f) +onToggleCapture :: (SyntheticEvent -> Effect Unit) -> Props +onToggleCapture f = unsafeMkProps "onToggleCapture" (mkEffectFn1 f) -onErrorCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onErrorCapture f = unsafeMkProps "onErrorCapture" (handle f) +onErrorCapture :: (SyntheticEvent -> Effect Unit) -> Props +onErrorCapture f = unsafeMkProps "onErrorCapture" (mkEffectFn1 f) -onLoadCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadCapture f = unsafeMkProps "onLoadCapture" (handle f) +onLoadCapture :: (SyntheticEvent -> Effect Unit) -> Props +onLoadCapture f = unsafeMkProps "onLoadCapture" (mkEffectFn1 f) -onAbortCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onAbortCapture f = unsafeMkProps "onAbortCapture" (handle f) +onAbortCapture :: (SyntheticEvent -> Effect Unit) -> Props +onAbortCapture f = unsafeMkProps "onAbortCapture" (mkEffectFn1 f) -onCanPlayCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCanPlayCapture f = unsafeMkProps "onCanPlayCapture" (handle f) +onCanPlayCapture :: (SyntheticEvent -> Effect Unit) -> Props +onCanPlayCapture f = unsafeMkProps "onCanPlayCapture" (mkEffectFn1 f) -onCanPlayThroughCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCanPlayThroughCapture f = unsafeMkProps "onCanPlayThroughCapture" (handle f) +onCanPlayThroughCapture :: (SyntheticEvent -> Effect Unit) -> Props +onCanPlayThroughCapture f = unsafeMkProps "onCanPlayThroughCapture" (mkEffectFn1 f) -onDurationChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDurationChangeCapture f = unsafeMkProps "onDurationChangeCapture" (handle f) +onDurationChangeCapture :: (SyntheticEvent -> Effect Unit) -> Props +onDurationChangeCapture f = unsafeMkProps "onDurationChangeCapture" (mkEffectFn1 f) -onEmptiedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEmptiedCapture f = unsafeMkProps "onEmptiedCapture" (handle f) +onEmptiedCapture :: (SyntheticEvent -> Effect Unit) -> Props +onEmptiedCapture f = unsafeMkProps "onEmptiedCapture" (mkEffectFn1 f) -onEncryptedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEncryptedCapture f = unsafeMkProps "onEncryptedCapture" (handle f) +onEncryptedCapture :: (SyntheticEvent -> Effect Unit) -> Props +onEncryptedCapture f = unsafeMkProps "onEncryptedCapture" (mkEffectFn1 f) -onEndedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onEndedCapture f = unsafeMkProps "onEndedCapture" (handle f) +onEndedCapture :: (SyntheticEvent -> Effect Unit) -> Props +onEndedCapture f = unsafeMkProps "onEndedCapture" (mkEffectFn1 f) -onLoadedDataCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadedDataCapture f = unsafeMkProps "onLoadedDataCapture" (handle f) +onLoadedDataCapture :: (SyntheticEvent -> Effect Unit) -> Props +onLoadedDataCapture f = unsafeMkProps "onLoadedDataCapture" (mkEffectFn1 f) -onLoadedMetadataCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadedMetadataCapture f = unsafeMkProps "onLoadedMetadataCapture" (handle f) +onLoadedMetadataCapture :: (SyntheticEvent -> Effect Unit) -> Props +onLoadedMetadataCapture f = unsafeMkProps "onLoadedMetadataCapture" (mkEffectFn1 f) -onLoadStartCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onLoadStartCapture f = unsafeMkProps "onLoadStartCapture" (handle f) +onLoadStartCapture :: (SyntheticEvent -> Effect Unit) -> Props +onLoadStartCapture f = unsafeMkProps "onLoadStartCapture" (mkEffectFn1 f) -onPauseCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPauseCapture f = unsafeMkProps "onPauseCapture" (handle f) +onPauseCapture :: (SyntheticEvent -> Effect Unit) -> Props +onPauseCapture f = unsafeMkProps "onPauseCapture" (mkEffectFn1 f) -onPlayCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPlayCapture f = unsafeMkProps "onPlayCapture" (handle f) +onPlayCapture :: (SyntheticEvent -> Effect Unit) -> Props +onPlayCapture f = unsafeMkProps "onPlayCapture" (mkEffectFn1 f) -onPlayingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPlayingCapture f = unsafeMkProps "onPlayingCapture" (handle f) +onPlayingCapture :: (SyntheticEvent -> Effect Unit) -> Props +onPlayingCapture f = unsafeMkProps "onPlayingCapture" (mkEffectFn1 f) -onProgressCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onProgressCapture f = unsafeMkProps "onProgressCapture" (handle f) +onProgressCapture :: (SyntheticEvent -> Effect Unit) -> Props +onProgressCapture f = unsafeMkProps "onProgressCapture" (mkEffectFn1 f) -onRateChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onRateChangeCapture f = unsafeMkProps "onRateChangeCapture" (handle f) +onRateChangeCapture :: (SyntheticEvent -> Effect Unit) -> Props +onRateChangeCapture f = unsafeMkProps "onRateChangeCapture" (mkEffectFn1 f) -onSeekedCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSeekedCapture f = unsafeMkProps "onSeekedCapture" (handle f) +onSeekedCapture :: (SyntheticEvent -> Effect Unit) -> Props +onSeekedCapture f = unsafeMkProps "onSeekedCapture" (mkEffectFn1 f) -onSeekingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSeekingCapture f = unsafeMkProps "onSeekingCapture" (handle f) +onSeekingCapture :: (SyntheticEvent -> Effect Unit) -> Props +onSeekingCapture f = unsafeMkProps "onSeekingCapture" (mkEffectFn1 f) -onStalledCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onStalledCapture f = unsafeMkProps "onStalledCapture" (handle f) +onStalledCapture :: (SyntheticEvent -> Effect Unit) -> Props +onStalledCapture f = unsafeMkProps "onStalledCapture" (mkEffectFn1 f) -onSuspendCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSuspendCapture f = unsafeMkProps "onSuspendCapture" (handle f) +onSuspendCapture :: (SyntheticEvent -> Effect Unit) -> Props +onSuspendCapture f = unsafeMkProps "onSuspendCapture" (mkEffectFn1 f) -onTimeUpdateCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTimeUpdateCapture f = unsafeMkProps "onTimeUpdateCapture" (handle f) +onTimeUpdateCapture :: (SyntheticEvent -> Effect Unit) -> Props +onTimeUpdateCapture f = unsafeMkProps "onTimeUpdateCapture" (mkEffectFn1 f) -onVolumeChangeCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onVolumeChangeCapture f = unsafeMkProps "onVolumeChangeCapture" (handle f) +onVolumeChangeCapture :: (SyntheticEvent -> Effect Unit) -> Props +onVolumeChangeCapture f = unsafeMkProps "onVolumeChangeCapture" (mkEffectFn1 f) -onWaitingCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onWaitingCapture f = unsafeMkProps "onWaitingCapture" (handle f) +onWaitingCapture :: (SyntheticEvent -> Effect Unit) -> Props +onWaitingCapture f = unsafeMkProps "onWaitingCapture" (mkEffectFn1 f) -onCopyCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCopyCapture f = unsafeMkProps "onCopyCapture" (handle f) +onCopyCapture :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onCopyCapture f = unsafeMkProps "onCopyCapture" (mkEffectFn1 f) -onCutCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCutCapture f = unsafeMkProps "onCutCapture" (handle f) +onCutCapture :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onCutCapture f = unsafeMkProps "onCutCapture" (mkEffectFn1 f) -onPasteCapture :: forall eff props state result. - (SyntheticClipboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onPasteCapture f = unsafeMkProps "onPasteCapture" (handle f) +onPasteCapture :: (SyntheticClipboardEvent -> Effect Unit) -> Props +onPasteCapture f = unsafeMkProps "onPasteCapture" (mkEffectFn1 f) -onCompositionEndCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionEndCapture f = unsafeMkProps "onCompositionEndCapture" (handle f) +onCompositionEndCapture :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionEndCapture f = unsafeMkProps "onCompositionEndCapture" (mkEffectFn1 f) -onCompositionStartCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionStartCapture f = unsafeMkProps "onCompositionStartCapture" (handle f) +onCompositionStartCapture :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionStartCapture f = unsafeMkProps "onCompositionStartCapture" (mkEffectFn1 f) -onCompositionUpdateCapture :: forall eff props state result. - (SyntheticCompositionEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onCompositionUpdateCapture f = unsafeMkProps "onCompositionUpdateCapture" (handle f) +onCompositionUpdateCapture :: (SyntheticCompositionEvent -> Effect Unit) -> Props +onCompositionUpdateCapture f = unsafeMkProps "onCompositionUpdateCapture" (mkEffectFn1 f) -onKeyDownCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyDownCapture f = unsafeMkProps "onKeyDownCapture" (handle f) +onKeyDownCapture :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyDownCapture f = unsafeMkProps "onKeyDownCapture" (mkEffectFn1 f) -onKeyPressCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyPressCapture f = unsafeMkProps "onKeyPressCapture" (handle f) +onKeyPressCapture :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyPressCapture f = unsafeMkProps "onKeyPressCapture" (mkEffectFn1 f) -onKeyUpCapture :: forall eff props state result. - (SyntheticKeyboardEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onKeyUpCapture f = unsafeMkProps "onKeyUpCapture" (handle f) +onKeyUpCapture :: (SyntheticKeyboardEvent -> Effect Unit) -> Props +onKeyUpCapture f = unsafeMkProps "onKeyUpCapture" (mkEffectFn1 f) -onFocusCapture :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onFocusCapture f = unsafeMkProps "onFocusCapture" (handle f) +onFocusCapture :: (SyntheticFocusEvent -> Effect Unit) -> Props +onFocusCapture f = unsafeMkProps "onFocusCapture" (mkEffectFn1 f) -onBlurCapture :: forall eff props state result. - (SyntheticFocusEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onBlurCapture f = unsafeMkProps "onBlurCapture" (handle f) +onBlurCapture :: (SyntheticFocusEvent -> Effect Unit) -> Props +onBlurCapture f = unsafeMkProps "onBlurCapture" (mkEffectFn1 f) -onChangeCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onChangeCapture f = unsafeMkProps "onChangeCapture" (handle f) +onChangeCapture :: (SyntheticInputEvent -> Effect Unit) -> Props +onChangeCapture f = unsafeMkProps "onChangeCapture" (mkEffectFn1 f) -onInputCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onInputCapture f = unsafeMkProps "onInputCapture" (handle f) +onInputCapture :: (SyntheticInputEvent -> Effect Unit) -> Props +onInputCapture f = unsafeMkProps "onInputCapture" (mkEffectFn1 f) -onInvalidCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onInvalidCapture f = unsafeMkProps "onInvalidCapture" (handle f) +onInvalidCapture :: (SyntheticInputEvent -> Effect Unit) -> Props +onInvalidCapture f = unsafeMkProps "onInvalidCapture" (mkEffectFn1 f) -onSubmitCapture :: forall eff props state result. - (SyntheticInputEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSubmitCapture f = unsafeMkProps "onSubmitCapture" (handle f) +onSubmitCapture :: (SyntheticInputEvent -> Effect Unit) -> Props +onSubmitCapture f = unsafeMkProps "onSubmitCapture" (mkEffectFn1 f) -onClickCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onClickCapture f = unsafeMkProps "onClickCapture" (handle f) +onClickCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onClickCapture f = unsafeMkProps "onClickCapture" (mkEffectFn1 f) -onContextMenuCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onContextMenuCapture f = unsafeMkProps "onContextMenuCapture" (handle f) +onContextMenuCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onContextMenuCapture f = unsafeMkProps "onContextMenuCapture" (mkEffectFn1 f) -onDoubleClickCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDoubleClickCapture f = unsafeMkProps "onDoubleClickCapture" (handle f) +onDoubleClickCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDoubleClickCapture f = unsafeMkProps "onDoubleClickCapture" (mkEffectFn1 f) -onDragCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragCapture f = unsafeMkProps "onDragCapture" (handle f) +onDragCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragCapture f = unsafeMkProps "onDragCapture" (mkEffectFn1 f) -onDragEndCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragEndCapture f = unsafeMkProps "onDragEndCapture" (handle f) +onDragEndCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragEndCapture f = unsafeMkProps "onDragEndCapture" (mkEffectFn1 f) -onDragEnterCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragEnterCapture f = unsafeMkProps "onDragEnterCapture" (handle f) +onDragEnterCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragEnterCapture f = unsafeMkProps "onDragEnterCapture" (mkEffectFn1 f) -onDragExitCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragExitCapture f = unsafeMkProps "onDragExitCapture" (handle f) +onDragExitCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragExitCapture f = unsafeMkProps "onDragExitCapture" (mkEffectFn1 f) -onDragLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragLeaveCapture f = unsafeMkProps "onDragLeaveCapture" (handle f) +onDragLeaveCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragLeaveCapture f = unsafeMkProps "onDragLeaveCapture" (mkEffectFn1 f) -onDragOverCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragOverCapture f = unsafeMkProps "onDragOverCapture" (handle f) +onDragOverCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragOverCapture f = unsafeMkProps "onDragOverCapture" (mkEffectFn1 f) -onDragStartCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDragStartCapture f = unsafeMkProps "onDragStartCapture" (handle f) +onDragStartCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDragStartCapture f = unsafeMkProps "onDragStartCapture" (mkEffectFn1 f) -onDropCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onDropCapture f = unsafeMkProps "onDropCapture" (handle f) +onDropCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onDropCapture f = unsafeMkProps "onDropCapture" (mkEffectFn1 f) -onMouseDownCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseDownCapture f = unsafeMkProps "onMouseDownCapture" (handle f) +onMouseDownCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseDownCapture f = unsafeMkProps "onMouseDownCapture" (mkEffectFn1 f) -onMouseEnterCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseEnterCapture f = unsafeMkProps "onMouseEnterCapture" (handle f) +onMouseEnterCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseEnterCapture f = unsafeMkProps "onMouseEnterCapture" (mkEffectFn1 f) -onMouseLeaveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseLeaveCapture f = unsafeMkProps "onMouseLeaveCapture" (handle f) +onMouseLeaveCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseLeaveCapture f = unsafeMkProps "onMouseLeaveCapture" (mkEffectFn1 f) -onMouseMoveCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseMoveCapture f = unsafeMkProps "onMouseMoveCapture" (handle f) +onMouseMoveCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseMoveCapture f = unsafeMkProps "onMouseMoveCapture" (mkEffectFn1 f) -onMouseOutCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseOutCapture f = unsafeMkProps "onMouseOutCapture" (handle f) +onMouseOutCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseOutCapture f = unsafeMkProps "onMouseOutCapture" (mkEffectFn1 f) -onMouseOverCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseOverCapture f = unsafeMkProps "onMouseOverCapture" (handle f) +onMouseOverCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseOverCapture f = unsafeMkProps "onMouseOverCapture" (mkEffectFn1 f) -onMouseUpCapture :: forall eff props state result. - (SyntheticMouseEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onMouseUpCapture f = unsafeMkProps "onMouseUpCapture" (handle f) +onMouseUpCapture :: (SyntheticMouseEvent -> Effect Unit) -> Props +onMouseUpCapture f = unsafeMkProps "onMouseUpCapture" (mkEffectFn1 f) -onSelectCapture :: forall eff props state result. - (SyntheticEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onSelectCapture f = unsafeMkProps "onSelectCapture" (handle f) +onSelectCapture :: (SyntheticEvent -> Effect Unit) -> Props +onSelectCapture f = unsafeMkProps "onSelectCapture" (mkEffectFn1 f) -onTouchCancelCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchCancelCapture f = unsafeMkProps "onTouchCancelCapture" (handle f) +onTouchCancelCapture :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchCancelCapture f = unsafeMkProps "onTouchCancelCapture" (mkEffectFn1 f) -onTouchEndCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchEndCapture f = unsafeMkProps "onTouchEndCapture" (handle f) +onTouchEndCapture :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchEndCapture f = unsafeMkProps "onTouchEndCapture" (mkEffectFn1 f) -onTouchMoveCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchMoveCapture f = unsafeMkProps "onTouchMoveCapture" (handle f) +onTouchMoveCapture :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchMoveCapture f = unsafeMkProps "onTouchMoveCapture" (mkEffectFn1 f) -onTouchStartCapture :: forall eff props state result. - (SyntheticTouchEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onTouchStartCapture f = unsafeMkProps "onTouchStartCapture" (handle f) +onTouchStartCapture :: (SyntheticTouchEvent -> Effect Unit) -> Props +onTouchStartCapture f = unsafeMkProps "onTouchStartCapture" (mkEffectFn1 f) -onScrollCapture :: forall eff props state result. - (SyntheticUIEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onScrollCapture f = unsafeMkProps "onScrollCapture" (handle f) +onScrollCapture :: (SyntheticUIEvent -> Effect Unit) -> Props +onScrollCapture f = unsafeMkProps "onScrollCapture" (mkEffectFn1 f) -onWheelCapture :: forall eff props state result. - (SyntheticWheelEvent -> SyntheticEventHandlerContext eff props state result) -> Props -onWheelCapture f = unsafeMkProps "onWheelCapture" (handle f) +onWheelCapture :: (SyntheticWheelEvent -> Effect Unit) -> Props +onWheelCapture f = unsafeMkProps "onWheelCapture" (mkEffectFn1 f) -ref :: forall eff props state result. - (Nullable Ref -> SyntheticEventHandlerContext eff props state result) -> Props -ref f = unsafeMkProps "ref" (handle f) +ref :: (Nullable ReactRef -> Effect Unit) -> Props +ref f = unsafeMkProps "ref" (mkEffectFn1 f) suppressContentEditableWarning :: Boolean -> Props suppressContentEditableWarning = unsafeMkProps "suppressContentEditableWarning" diff --git a/src/React/SyntheticEvent.purs b/src/React/SyntheticEvent.purs index 92d7a48..fffdadd 100644 --- a/src/React/SyntheticEvent.purs +++ b/src/React/SyntheticEvent.purs @@ -93,9 +93,9 @@ module React.SyntheticEvent import Prelude -import Control.Monad.Eff (Eff) - import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol) +import Effect (Effect) +import Prim.Row as Row type SyntheticEvent = SyntheticEvent_ (SyntheticEvent' ()) @@ -248,160 +248,160 @@ type SyntheticWheelEvent' r | r ) -bubbles :: forall eff r. SyntheticEvent_ (bubbles :: Boolean | r) -> Eff eff Boolean +bubbles :: forall r. SyntheticEvent_ (bubbles :: Boolean | r) -> Effect Boolean bubbles = get (SProxy :: SProxy "bubbles") -cancelable :: forall eff r. SyntheticEvent_ (cancelable :: Boolean | r) -> Eff eff Boolean +cancelable :: forall r. SyntheticEvent_ (cancelable :: Boolean | r) -> Effect Boolean cancelable = get (SProxy :: SProxy "cancelable") -currentTarget :: forall eff r. SyntheticEvent_ (currentTarget :: NativeEventTarget | r) -> Eff eff NativeEventTarget +currentTarget :: forall r. SyntheticEvent_ (currentTarget :: NativeEventTarget | r) -> Effect NativeEventTarget currentTarget = get (SProxy :: SProxy "currentTarget") -defaultPrevented :: forall eff r. SyntheticEvent_ (defaultPrevented :: Boolean | r) -> Eff eff Boolean +defaultPrevented :: forall r. SyntheticEvent_ (defaultPrevented :: Boolean | r) -> Effect Boolean defaultPrevented = get (SProxy :: SProxy "defaultPrevented") -eventPhase :: forall eff r. SyntheticEvent_ (eventPhase :: Number | r) -> Eff eff Number +eventPhase :: forall r. SyntheticEvent_ (eventPhase :: Number | r) -> Effect Number eventPhase = get (SProxy :: SProxy "eventPhase") -isTrusted :: forall eff r. SyntheticEvent_ (isTrusted :: Boolean | r) -> Eff eff Boolean +isTrusted :: forall r. SyntheticEvent_ (isTrusted :: Boolean | r) -> Effect Boolean isTrusted = get (SProxy :: SProxy "isTrusted") -nativeEvent :: forall eff r. SyntheticEvent_ (nativeEvent :: NativeEvent | r) -> Eff eff NativeEvent +nativeEvent :: forall r. SyntheticEvent_ (nativeEvent :: NativeEvent | r) -> Effect NativeEvent nativeEvent = get (SProxy :: SProxy "nativeEvent") -target :: forall eff r. SyntheticEvent_ (target :: NativeEventTarget | r) -> Eff eff NativeEventTarget +target :: forall r. SyntheticEvent_ (target :: NativeEventTarget | r) -> Effect NativeEventTarget target = get (SProxy :: SProxy "target") -timeStamp :: forall eff r. SyntheticEvent_ (timeStamp :: Number | r) -> Eff eff Number +timeStamp :: forall r. SyntheticEvent_ (timeStamp :: Number | r) -> Effect Number timeStamp = get (SProxy :: SProxy "timeStamp") -type_ :: forall eff r. SyntheticEvent_ (type :: String | r) -> Eff eff String +type_ :: forall r. SyntheticEvent_ (type :: String | r) -> Effect String type_ = get (SProxy :: SProxy "type") -animationName :: forall eff r. SyntheticEvent_ (animationName :: String | r) -> Eff eff String +animationName :: forall r. SyntheticEvent_ (animationName :: String | r) -> Effect String animationName = get (SProxy :: SProxy "animationName") -clipboardData :: forall eff r. SyntheticEvent_ (clipboardData :: NativeDataTransfer | r) -> Eff eff NativeDataTransfer +clipboardData :: forall r. SyntheticEvent_ (clipboardData :: NativeDataTransfer | r) -> Effect NativeDataTransfer clipboardData = get (SProxy :: SProxy "clipboardData") -data_ :: forall eff r. SyntheticEvent_ (data :: String | r) -> Eff eff String +data_ :: forall r. SyntheticEvent_ (data :: String | r) -> Effect String data_ = get (SProxy :: SProxy "data") -relatedTarget :: forall eff r. SyntheticEvent_ (relatedTarget :: NativeEventTarget | r) -> Eff eff NativeEventTarget +relatedTarget :: forall r. SyntheticEvent_ (relatedTarget :: NativeEventTarget | r) -> Effect NativeEventTarget relatedTarget = get (SProxy :: SProxy "relatedTarget") -charCode :: forall eff r. SyntheticEvent_ (charCode :: Int | r) -> Eff eff Int +charCode :: forall r. SyntheticEvent_ (charCode :: Int | r) -> Effect Int charCode = get (SProxy :: SProxy "charCode") -key :: forall eff r. SyntheticEvent_ (key :: String | r) -> Eff eff String +key :: forall r. SyntheticEvent_ (key :: String | r) -> Effect String key = get (SProxy :: SProxy "key") -keyCode :: forall eff r. SyntheticEvent_ (keyCode :: Number | r) -> Eff eff Number +keyCode :: forall r. SyntheticEvent_ (keyCode :: Number | r) -> Effect Number keyCode = get (SProxy :: SProxy "keyCode") -locale :: forall eff r. SyntheticEvent_ (locale :: String | r) -> Eff eff String +locale :: forall r. SyntheticEvent_ (locale :: String | r) -> Effect String locale = get (SProxy :: SProxy "locale") -location :: forall eff r. SyntheticEvent_ (location :: Number | r) -> Eff eff Number +location :: forall r. SyntheticEvent_ (location :: Number | r) -> Effect Number location = get (SProxy :: SProxy "location") -repeat :: forall eff r. SyntheticEvent_ (repeat :: Boolean | r) -> Eff eff Boolean +repeat :: forall r. SyntheticEvent_ (repeat :: Boolean | r) -> Effect Boolean repeat = get (SProxy :: SProxy "repeat") -which :: forall eff r. SyntheticEvent_ (which :: Number | r) -> Eff eff Number +which :: forall r. SyntheticEvent_ (which :: Number | r) -> Effect Number which = get (SProxy :: SProxy "which") -button :: forall eff r. SyntheticEvent_ (button :: Number | r) -> Eff eff Number +button :: forall r. SyntheticEvent_ (button :: Number | r) -> Effect Number button = get (SProxy :: SProxy "button") -buttons :: forall eff r. SyntheticEvent_ (buttons :: Number | r) -> Eff eff Number +buttons :: forall r. SyntheticEvent_ (buttons :: Number | r) -> Effect Number buttons = get (SProxy :: SProxy "buttons") -clientX :: forall eff r. SyntheticEvent_ (clientX :: Number | r) -> Eff eff Number +clientX :: forall r. SyntheticEvent_ (clientX :: Number | r) -> Effect Number clientX = get (SProxy :: SProxy "clientX") -clientY :: forall eff r. SyntheticEvent_ (clientY :: Number | r) -> Eff eff Number +clientY :: forall r. SyntheticEvent_ (clientY :: Number | r) -> Effect Number clientY = get (SProxy :: SProxy "clientY") -pageX :: forall eff r. SyntheticEvent_ (pageX :: Number | r) -> Eff eff Number +pageX :: forall r. SyntheticEvent_ (pageX :: Number | r) -> Effect Number pageX = get (SProxy :: SProxy "pageX") -pageY :: forall eff r. SyntheticEvent_ (pageY :: Number | r) -> Eff eff Number +pageY :: forall r. SyntheticEvent_ (pageY :: Number | r) -> Effect Number pageY = get (SProxy :: SProxy "pageY") -screenX :: forall eff r. SyntheticEvent_ (screenX :: Number | r) -> Eff eff Number +screenX :: forall r. SyntheticEvent_ (screenX :: Number | r) -> Effect Number screenX = get (SProxy :: SProxy "screenX") -screenY :: forall eff r. SyntheticEvent_ (screenY :: Number | r) -> Eff eff Number +screenY :: forall r. SyntheticEvent_ (screenY :: Number | r) -> Effect Number screenY = get (SProxy :: SProxy "screenY") -changedTouches :: forall eff r. SyntheticEvent_ (changedTouches :: NativeTouchList | r) -> Eff eff NativeTouchList +changedTouches :: forall r. SyntheticEvent_ (changedTouches :: NativeTouchList | r) -> Effect NativeTouchList changedTouches = get (SProxy :: SProxy "changedTouches") -targetTouches :: forall eff r. SyntheticEvent_ (targetTouches :: NativeTouchList | r) -> Eff eff NativeTouchList +targetTouches :: forall r. SyntheticEvent_ (targetTouches :: NativeTouchList | r) -> Effect NativeTouchList targetTouches = get (SProxy :: SProxy "targetTouches") -touches :: forall eff r. SyntheticEvent_ (touches :: NativeTouchList | r) -> Eff eff NativeTouchList +touches :: forall r. SyntheticEvent_ (touches :: NativeTouchList | r) -> Effect NativeTouchList touches = get (SProxy :: SProxy "touches") -altKey :: forall eff r. SyntheticEvent_ (altKey :: Boolean | r) -> Eff eff Boolean +altKey :: forall r. SyntheticEvent_ (altKey :: Boolean | r) -> Effect Boolean altKey = get (SProxy :: SProxy "altKey") -ctrlKey :: forall eff r. SyntheticEvent_ (ctrlKey :: Boolean | r) -> Eff eff Boolean +ctrlKey :: forall r. SyntheticEvent_ (ctrlKey :: Boolean | r) -> Effect Boolean ctrlKey = get (SProxy :: SProxy "ctrlKey") -metaKey :: forall eff r. SyntheticEvent_ (metaKey :: Boolean | r) -> Eff eff Boolean +metaKey :: forall r. SyntheticEvent_ (metaKey :: Boolean | r) -> Effect Boolean metaKey = get (SProxy :: SProxy "metaKey") -shiftKey :: forall eff r. SyntheticEvent_ (shiftKey :: Boolean | r) -> Eff eff Boolean +shiftKey :: forall r. SyntheticEvent_ (shiftKey :: Boolean | r) -> Effect Boolean shiftKey = get (SProxy :: SProxy "shiftKey") -propertyName :: forall eff r. SyntheticEvent_ (propertyName :: String | r) -> Eff eff String +propertyName :: forall r. SyntheticEvent_ (propertyName :: String | r) -> Effect String propertyName = get (SProxy :: SProxy "propertyName") -pseudoElement :: forall eff r. SyntheticEvent_ (pseudoElement :: String | r) -> Eff eff String +pseudoElement :: forall r. SyntheticEvent_ (pseudoElement :: String | r) -> Effect String pseudoElement = get (SProxy :: SProxy "pseudoElement") -elapsedTime :: forall eff r. SyntheticEvent_ (elapsedTime :: Number | r) -> Eff eff Number +elapsedTime :: forall r. SyntheticEvent_ (elapsedTime :: Number | r) -> Effect Number elapsedTime = get (SProxy :: SProxy "elapsedTime") -detail :: forall eff r. SyntheticEvent_ (detail :: Number | r) -> Eff eff Number +detail :: forall r. SyntheticEvent_ (detail :: Number | r) -> Effect Number detail = get (SProxy :: SProxy "detail") -view :: forall eff r. SyntheticEvent_ (view :: NativeAbstractView | r) -> Eff eff NativeAbstractView +view :: forall r. SyntheticEvent_ (view :: NativeAbstractView | r) -> Effect NativeAbstractView view = get (SProxy :: SProxy "view") -deltaMode :: forall eff r. SyntheticEvent_ (deltaMode :: Number | r) -> Eff eff Number +deltaMode :: forall r. SyntheticEvent_ (deltaMode :: Number | r) -> Effect Number deltaMode = get (SProxy :: SProxy "deltaMode") -deltaX :: forall eff r. SyntheticEvent_ (deltaX :: Number | r) -> Eff eff Number +deltaX :: forall r. SyntheticEvent_ (deltaX :: Number | r) -> Effect Number deltaX = get (SProxy :: SProxy "deltaX") -deltaY :: forall eff r. SyntheticEvent_ (deltaY :: Number | r) -> Eff eff Number +deltaY :: forall r. SyntheticEvent_ (deltaY :: Number | r) -> Effect Number deltaY = get (SProxy :: SProxy "deltaY") -deltaZ :: forall eff r. SyntheticEvent_ (deltaZ :: Number | r) -> Eff eff Number +deltaZ :: forall r. SyntheticEvent_ (deltaZ :: Number | r) -> Effect Number deltaZ = get (SProxy :: SProxy "deltaZ") -foreign import preventDefault :: forall eff r. SyntheticEvent_ r -> Eff eff Unit +foreign import preventDefault :: forall r. SyntheticEvent_ r -> Effect Unit -foreign import isDefaultPrevented :: forall eff r. SyntheticEvent_ r -> Eff eff Boolean +foreign import isDefaultPrevented :: forall r. SyntheticEvent_ r -> Effect Boolean -foreign import stopPropagation :: forall eff r. SyntheticEvent_ r -> Eff eff Unit +foreign import stopPropagation :: forall r. SyntheticEvent_ r -> Effect Unit -foreign import isPropagationStopped :: forall eff r. SyntheticEvent_ r -> Eff eff Boolean +foreign import isPropagationStopped :: forall r. SyntheticEvent_ r -> Effect Boolean -foreign import persist :: forall eff r. SyntheticEvent_ r -> Eff eff Unit +foreign import persist :: forall r. SyntheticEvent_ r -> Effect Unit -foreign import getModifierState :: forall eff r. String -> SyntheticEvent_ (getModifierState :: String -> Boolean | r) -> Eff eff Boolean +foreign import getModifierState :: forall r. String -> SyntheticEvent_ (getModifierState :: String -> Boolean | r) -> Effect Boolean get - :: forall eff l r s a - . RowCons l a r s + :: forall l r s a + . Row.Cons l a r s => IsSymbol l => SProxy l -> SyntheticEvent_ s - -> Eff eff a + -> Effect a get l r = unsafeGet (reflectSymbol l) r -foreign import unsafeGet :: forall eff r a. String -> SyntheticEvent_ r -> Eff eff a +foreign import unsafeGet :: forall r a. String -> SyntheticEvent_ r -> Effect a