make-event-props

WebJar for make-event-props

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

make-event-props
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

make-event-props
WebJar for make-event-props
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/wojtekmaj/make-event-props

Download make-event-props

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/make-event-props/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>make-event-props</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/make-event-props/
implementation 'org.webjars.npm:make-event-props:1.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/make-event-props/
implementation ("org.webjars.npm:make-event-props:1.2.0")
'org.webjars.npm:make-event-props:jar:1.2.0'
<dependency org="org.webjars.npm" name="make-event-props" rev="1.2.0">
  <artifact name="make-event-props" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='make-event-props', version='1.2.0')
)
libraryDependencies += "org.webjars.npm" % "make-event-props" % "1.2.0"
[org.webjars.npm/make-event-props "1.2.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

npm downloads CI dependencies dev dependencies tested with jest

Make-Event-Props

A function that, given props, returns an object of event callback props optionally curried with additional arguments.

This package allows you to pass event callback props to a rendered DOM element without the risk of applying any invalid props that could cause unwanted side effects.

tl;dr

  • Install by executing npm install make-event-props or yarn add make-event-props.
  • Import by adding import makeEventProps from 'make-event-props'.
  • Create your event props object:
    get eventProps() {
      return makeEventProps(this.props, () => this.state.pdf);
    }
  • Use your event props:
    render() {
      return (
        <div {...this.eventProps} />
      );
    }

License

The MIT License.

Author

Wojciech Maj
[email protected]
http://wojtekmaj.pl

Versions

Version
1.2.0