Skip to content

Commit

Permalink
Upgrade to custom react-motion to support React 18.x
Browse files Browse the repository at this point in the history
  • Loading branch information
choozn committed May 7, 2022
1 parent 3d422f4 commit fe0b480
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"dependencies": {
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"@types/react-motion": "^0.0.32",
"react-motion": "^0.5.2"
"react-motion-prefixed": "^0.6.4"
},
"devDependencies": {
"babel-core": "^6.26.3",
Expand Down
16 changes: 8 additions & 8 deletions src/Child.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { SpringHelperConfig } from 'react-motion';
import { SpringHelperConfig } from 'react-motion-prefixed';
import { Middleware } from './interfaces';

interface Props {
factorX?: number;
factorY?: number;
springConfig?: SpringHelperConfig;
children?: JSX.Element | JSX.Element[];
className?: string;
updateStyles?: Middleware | React.CSSProperties;
inverted?: boolean;
factorX?: number;
factorY?: number;
springConfig?: SpringHelperConfig;
children?: JSX.Element | JSX.Element[];
className?: string;
updateStyles?: Middleware | React.CSSProperties;
inverted?: boolean;
}

const MouseParallaxChild = ({ children }: Props) => <> {children} </>;
Expand Down
2 changes: 1 addition & 1 deletion src/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { Motion, spring } from 'react-motion';
import { Motion, spring } from 'react-motion-prefixed';

interface Props {
children: JSX.Element[] | JSX.Element;
Expand Down

0 comments on commit fe0b480

Please sign in to comment.