react-lottie को 1.x से 2.x पर अपग्रेड करना
react-lottie 1.2.10 और 2.1.0 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।
सारांश
| हटाए गए इम्पोर्ट पाथ | 0 |
|---|---|
| हटाए गए एक्सपोर्ट | 0 |
| बदले गए सिग्नेचर | 0 |
| क्लास या इंटरफ़ेस के हटाए गए सदस्य | 0 |
| क्लास या इंटरफ़ेस के बदले गए सदस्य | 0 |
| नए डिप्रिकेटेड | 0 |
| आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ) | 1 |
| नए एक्सपोर्ट | 0 |
हटाए गए एक्सपोर्ट
कुछ नहीं मिला।
बदले गए सिग्नेचर
कुछ नहीं मिला।
क्लास या इंटरफ़ेस के हटाए गए सदस्य
कुछ नहीं मिला।
क्लास या इंटरफ़ेस के बदले गए सदस्य
कुछ नहीं मिला।
नए डिप्रिकेटेड
कुछ नहीं मिला।
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)
| पहले | बाद में | |
|---|---|---|
peerDependencies.react | >=15.0.0 | >=16.8.0 |
इन संस्करणों के बीच का changelog
पैकेज के लेखकों द्वारा प्रकाशित पाठ, जैसा है वैसा दिखाया गया।
2.1.0
### Features
* add an `isSubframe` prop that is passed to lottie-web's `setSubframe()`, so `enterFrame` can fire only on whole After Effects frames, e.g. to trigger audio exactly on frame boundaries ([#71](https://github.com/chenqingspring/react-lottie/issues/71))
* expose `goToAndStop(frame, isFrame)` and `goToAndPlay(frame, isFrame)` on the component instance, which makes it possible to drive an animation from scroll position or jump to an exact frame/marker through a `ref` ([#40](https://github.com/chenqingspring/react-lottie/issues/40))
### Bug Fixes
* keep a playing animation running when an unrelated prop changes; added a regression test for the state-change pause reported in [#43](https://github.com/chenqingspring/react-lottie/issues/43)2.0.1
### Bug Fixes
* apply the `segments` prop on mount, so an animation starts inside the requested range instead of playing the full timeline until the prop changes; an animation created with `autoplay: false` stays paused at the start of the range2.0.0
This release folds in the changes that were prepared as 1.2.11 (never
published) and modernizes the development toolchain.
### Breaking Changes
* the `react` peer dependency is now `>=16.8.0` (previously `>=15.0.0`);
React 15 is no longer supported. The component is tested against React 18
and works with React 19.
* import animation JSON with a default import
(`import animationData from './pinjump.json'`). A namespace import
(`import * as animationData`) yields a frozen ESM module object that
lottie-web cannot annotate, which fails under Vite and other strict ESM
bundlers.
### Features
* add a `tabIndex` prop so presentational animations can be removed from the tab order ([#130](https://github.com/chenqingspring/react-lottie/issues/130))
* support the `renderer` option and document it in the README
* print a highlighted maintenance banner after `npm install` (maintained automatically by Relay; report bugs and feature requests on GitHub; https://get-relay.cc) and document it in the README
### Bug Fixes
* leave playback alone on re-renders unless a playback prop changed, so an `autoplay: false` animation no longer starts itself and a paused one is not restarted; a re-created but equal `segments` array no longer replays the animation ([#32](https://github.com/chenqingspring/react-lottie/issues/32), [#43](https://github.com/chenqingspring/react-lottie/issues/43))
* apply the initial `isStopped`, `isPaused` and `direction` props on mount instead of only on update
* replay changed segments immediately by passing `force` to `playSegments` ([#82](https://github.com/chenqingspring/react-lottie/issues/82))
* reload the animation when the remote `path` option changes ([#99](https://github.com/chenqingspring/react-lottie/issues/99))
* run the data/path reload on modern React instead of the deprecated `componentWillUpdate` ([#77](https://github.com/chenqingspring/react-lottie/issues/77))
* guard `destroy()` when the animation was never created ([#51](https://github.com/chenqingspring/react-lottie/issues/51))
* make the imperative `pause()` method actually pause, and stop restarting a paused animation on unrelated prop updates ([#58](https://github.com/chenqingspring/react-lottie/issues/58))
* drop the runtime dependency on `babel-runtime`, which broke consumers' builds ([#177](https://github.com/chenqingspring/react-lottie/issues/177))अपने AI एजेंट को ये तथ्य दें
Vigia एक मुफ़्त MCP सर्वर है: आपका कोडिंग एजेंट कोड लिखने से पहले वर्ज़न, ब्रेकिंग बदलाव और कमज़ोरियाँ जाँचता है। न साइनअप, न API कुंजी।
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Cursor में जोड़ेंVS Code में जोड़ें★ GitHub पर स्टार दें
कोई भी दूसरा MCP क्लाइंट
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }एजेंट स्किल (SKILL.md): एजेंट को बताती है कि Vigia कब इस्तेमाल करना है · पुल रिक्वेस्ट के लिए GitHub Action
अक्सर पूछे जाने वाले प्रश्न
react-lottie को 1 से 2 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?
react-lottie 1.2.10 और 2.1.0 के बीच Vigia को 0 हटाए गए एक्सपोर्ट, 0 बदले गए सिग्नेचर और 0 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।
react-lottie 2 में क्या डिप्रिकेट हुआ?
react-lottie 2.1.0 में 0 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।
एजेंटों के लिए
GET https://vigia.coredls.cloud/v1/packages/npm/react-lottie/upgrade?from=1.2.10&to=2.1.0