Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@klarna/react-native-vector-drawable

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@klarna/react-native-vector-drawable - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

android/src/fabric/java/com/klarna/vectordrawable/VectorDrawableComponentsRegistry.java

13

CHANGELOG.md

@@ -10,2 +10,12 @@ # Changelog

## [0.4.0] - 2022-07-15
### Added
- Fabric implementation.
### Fixed
- Removed redundant cast causing "BitmapDrawable cannot be cast to VectorDrawable".
## [0.3.0] - 2021-05-21

@@ -49,3 +59,4 @@

[unreleased]: https://github.com/klarna-incubator/react-native-vector-drawable/compare/v0.3.0...HEAD
[unreleased]: https://github.com/klarna-incubator/react-native-vector-drawable/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/klarna-incubator/react-native-vector-drawable/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/klarna-incubator/react-native-vector-drawable/compare/v0.2.1...v0.3.0

@@ -52,0 +63,0 @@ [0.2.1]: https://github.com/klarna-incubator/react-native-vector-drawable/compare/v0.2.0...v0.2.1

3

package.json
{
"name": "@klarna/react-native-vector-drawable",
"version": "0.3.0",
"version": "0.4.0",
"description": "Android vector drawables in React Native",

@@ -27,4 +27,5 @@ "main": "src",

"devDependencies": {
"@types/react-native": "^0.67.8",
"prettier": "^2.2.1"
}
}

@@ -17,2 +17,13 @@ # react-native-vector-drawable

<!-- Taken from https://github.com/software-mansion/react-native-screens/blob/main/README-Fabric.md -->
### Fabric installation
This library supports React Native New Architecture (aka Fabric). To use this library with your Fabric application, you have to:
1. Add latest `@klarna/react-native-vector-drawable`
2. on iOS:
- Install pods using `RCT_NEW_ARCH_ENABLED=1 pod install` – this is the same command you run to prepare a Fabric build but you also need to run it after a new native library gets added.
3. on Android:
- There are no additional steps required so long you app is configured to build with Fabric – this is typically configured by setting `newArchEnabled=true` in `gradle.properties` file in your project.
## Usage

@@ -55,3 +66,3 @@

Copyright © 2021 Klarna Bank AB
Copyright © 2022 Klarna Bank AB

@@ -58,0 +69,0 @@ For license details, see the [LICENSE](LICENSE) file in the root of this project.

import { requireNativeComponent } from 'react-native';
const VectorDrawable = requireNativeComponent('RNVectorDrawable');
const isFabricEnabled = global.nativeFabricUIManager != null;
export default VectorDrawable;
const RNVectorDrawable = isFabricEnabled
? require('./RNVectorDrawableNativeComponent').default
: requireNativeComponent('RNVectorDrawable');
export default RNVectorDrawable;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc