Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ios 9 ? #674

Closed
littlee opened this issue Jul 29, 2020 · 2 comments
Closed

support ios 9 ? #674

littlee opened this issue Jul 29, 2020 · 2 comments
Labels
feature New feature or request

Comments

@littlee
Copy link

littlee commented Jul 29, 2020

after importing proxy-polyfill, motion.div is undefined on ios 9 device

import 'proxy-polyfill';
import { motion } from 'framer-motion';
console.log(motion.div); // undefined

(I used to use react-pose, and it works fine on ios 9 with core-js polyfill)

import 'core-js/stable';
import 'regenerator-runtime/runtime';
@littlee littlee added the feature New feature or request label Jul 29, 2020
@mattgperry
Copy link
Collaborator

Hey @littlee

Motion doesn't support runtimes without Polyfill support I'm afraid, and it isn't polyfillable. I am considering a seperate entry point for people who absolutely need it and don't mind the added bundle size though.

@littlee
Copy link
Author

littlee commented Aug 12, 2020

after some search, I found motion.custom here
https://inventingwithmonster.io/20200302-can-i-use-framer-motion-with-styled-components/
(missing docs for motion.custom on the official website ? 🌚 )

on iOS 9
though motion.div is undefined, motion.custom can be used instead.

After re-write my component to

import { motion } from 'framer-motion';
const Wrap = motion.custom(styled.div``);

it finally works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants