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

@ionic/react

Package Overview
Dependencies
Maintainers
19
Versions
2899
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic/react - npm Package Compare versions

Comparing version 0.0.6-4 to 0.0.6-5

17

dist/index.esm.js

@@ -93,3 +93,3 @@ import { defineCustomElements } from '@ionic/core/loader';

function createReactComponent(tagName) {
function createReactComponent(tagName, attributeValues = []) {
const displayName = dashToPascalCase(tagName);

@@ -99,3 +99,2 @@ class ReactComponent extends React.Component {

super(props);
this.componentRef = React.createRef();
}

@@ -106,5 +105,5 @@ static get displayName() {

componentDidMount() {
this.componentWillReceiveProps(this.props);
this.componentDidUpdate(this.props);
}
componentWillReceiveProps(props) {
componentDidUpdate(props) {
const node = ReactDom.findDOMNode(this);

@@ -115,3 +114,9 @@ attachEventProps(node, props, this.props);

const _a = this.props, { children, forwardedRef } = _a, cProps = __rest(_a, ["children", "forwardedRef"]);
return React.createElement(tagName, Object.assign({}, cProps, { ref: forwardedRef }), children);
const propsWithoutAttributeValues = Object.keys(cProps).reduce((oldValue, key) => {
if (attributeValues.indexOf(key) === -1) {
oldValue[key] = cProps[key];
}
return oldValue;
}, {});
return React.createElement(tagName, Object.assign({}, propsWithoutAttributeValues, { ref: forwardedRef }), children);
}

@@ -127,3 +132,3 @@ }

// ionicons
const IonIcon = /*@__PURE__*/ createReactComponent('ion-icon');
const IonIcon = /*@__PURE__*/ createReactComponent('ion-icon', ['icon']);
// /*@__PURE__*/createReactComponent

@@ -130,0 +135,0 @@ const IonTabBarInner = /*@__PURE__*/ createReactComponent('ion-tab-bar');

@@ -98,3 +98,3 @@ 'use strict';

function createReactComponent(tagName) {
function createReactComponent(tagName, attributeValues = []) {
const displayName = dashToPascalCase(tagName);

@@ -104,3 +104,2 @@ class ReactComponent extends React.Component {

super(props);
this.componentRef = React.createRef();
}

@@ -111,5 +110,5 @@ static get displayName() {

componentDidMount() {
this.componentWillReceiveProps(this.props);
this.componentDidUpdate(this.props);
}
componentWillReceiveProps(props) {
componentDidUpdate(props) {
const node = ReactDom.findDOMNode(this);

@@ -120,3 +119,9 @@ attachEventProps(node, props, this.props);

const _a = this.props, { children, forwardedRef } = _a, cProps = tslib_1.__rest(_a, ["children", "forwardedRef"]);
return React.createElement(tagName, Object.assign({}, cProps, { ref: forwardedRef }), children);
const propsWithoutAttributeValues = Object.keys(cProps).reduce((oldValue, key) => {
if (attributeValues.indexOf(key) === -1) {
oldValue[key] = cProps[key];
}
return oldValue;
}, {});
return React.createElement(tagName, Object.assign({}, propsWithoutAttributeValues, { ref: forwardedRef }), children);
}

@@ -132,3 +137,3 @@ }

// ionicons
const IonIcon = /*@__PURE__*/ createReactComponent('ion-icon');
const IonIcon = /*@__PURE__*/ createReactComponent('ion-icon', ['icon']);
// /*@__PURE__*/createReactComponent

@@ -135,0 +140,0 @@ const IonTabBarInner = /*@__PURE__*/ createReactComponent('ion-tab-bar');

import React from 'react';
export declare function createReactComponent<PropType, ElementType>(tagName: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & {
export declare function createReactComponent<PropType, ElementType>(tagName: string, attributeValues?: string[]): React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & {
ref?: React.RefObject<ElementType>;
children?: React.ReactNode;
}> & React.RefAttributes<ElementType>>;
{
"name": "@ionic/react",
"version": "0.0.6-4",
"version": "0.0.6-5",
"description": "React specific wrapper for @ionic/core",

@@ -46,3 +46,4 @@ "keywords": [

"react-router": "^5.0.1",
"react-router-dom": "^5.0.1"
"react-router-dom": "^5.0.1",
"ionicons": "4.5.10-1"
},

@@ -57,2 +58,3 @@ "devDependencies": {

"@types/react-router-dom": "^4.3.1",
"ionicons": "4.5.10-1",
"jest": "^24.8.0",

@@ -59,0 +61,0 @@ "jest-dom": "^3.4.0",

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