Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
¿Cómo usar useInvertedScale con la última versión de framer motion en react js?

Uso el gancho useInvertedScale importado de framer-motion@1.6.0 y arroja un error useInvertedScale no se importa con la última versión de framer-motion .

Así es como lo uso:

 import React from "react"; import { motion, useInvertedScale } from "framer-motion"; export const Title = ({ title, category, isSelected }) => { const inverted = useInvertedScale(); const x = isSelected ? 30 : 15; const y = x; const scaleTranslate = ({ x, y, scaleX, scaleY }) => `scaleX(${scaleX}) scaleY(${scaleY}) translate(${x}, ${y}) translateZ(0)`; return ( <motion.div initial={false} animate={{ x, y }} transition={ isSelected ? { type: "spring", stiffness: 200, damping: 30 } : { type: "spring", stiffness: 300, damping: 35 } } transformTemplate={scaleTranslate} style={{ ...inverted, originX: 0, originY: 0, position: "absolute", top: 0, left: 0, maxWidth: "300px", }} > <span style={{ color: "#fff", fontSize: "14px", textAlign: "right", direction: "rtl", }} > {category} </span> <h2 style={{ textAlign: "right", direction: "rtl" }}>{title}</h2> </motion.div> ); };

¿Cuál es el reemplazo de este enlace con la nueva versión o simplemente se eliminó?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

useInvertedScale se renombra a useDeprecatedInvertedScale en versiones anteriores.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!