New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

preact-motion

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-motion

A fork of React-Motion to be used with Preact.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

Deprecation warning

Most of the changes are now present in react-motion. Just use preact-compat and everything should work out of the box. This module won't be maintained anymore.

Preact-Motion

Build Status

This is a fork of the well known React-Motion library customized to support Preact out of the box.

Please see the React-Motion documentation for usage instructions.

About this fork

Goals

  • Be compatible out of the box with Preact 8 and upper. No preact-compat requirement. No react dependency.

  • Stay as close as possible to React-Motion, including:

    • same API ;
    • same developpers tools (flow, prop-types) ;
    • same tests and demos.
  • Better, smaller packaging:

    • expose a jsnext:main entry point ;
    • use Rollup to provide smaller packages ;
    • other tweaks to make production bundles smaller.

Versioning

Due to semver limitations, this package won't follow the React-Motion versioning, so it can make major version bumps without waiting for a major version bump upstream. See CHANGELOG.md for informations about supported React-Motion version.

Bundle size

The current production-ready bundle is about 4KB (minified+gzip). This has been achieved by using Rollup instead of Webpack, and removing prop-types declarations and dependency.

Install

  • Npm: npm install --save preact-motion

The NPM package requires process.env.NODE_ENV to be defined, so you should look at stuff like webpack DefinePlugin or rollup-plugin-replace to be able to use it in a browser.

  • 1998 Script Tag:
<script src="https://unpkg.com/preact-motion/build/preact-motion.prod.js"></script>
(Module exposed as `PreactMotion`)

Demos

Keywords

react

FAQs

Package last updated on 11 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts