mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
This commit is contained in:
@ -4,8 +4,7 @@ import ReactDom from 'react-dom';
|
||||
import { NavContext } from '../contexts/NavContext';
|
||||
|
||||
import { RouterDirection } from './hrefprops';
|
||||
import { attachEventProps, createForwardRef, dashToPascalCase, isCoveredByReact } from './utils';
|
||||
import { deprecationWarning } from './utils/dev';
|
||||
import { attachProps, createForwardRef, dashToPascalCase, isCoveredByReact } from './utils';
|
||||
|
||||
interface IonicReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
|
||||
forwardedRef?: React.Ref<ElementType>;
|
||||
@ -29,16 +28,11 @@ export const createReactComponent = <PropType, ElementType>(
|
||||
|
||||
componentDidMount() {
|
||||
this.componentDidUpdate(this.props);
|
||||
if (this.props.href) {
|
||||
setTimeout(() => {
|
||||
deprecationWarning('hrefchange', 'As of RC3, href links no longer go through the router, so transitions will not be applied to these links. To maintain transitions, use the new routerLink prop.');
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: IonicReactInternalProps<PropType>) {
|
||||
const node = ReactDom.findDOMNode(this) as HTMLElement;
|
||||
attachEventProps(node, this.props, prevProps);
|
||||
attachProps(node, this.props, prevProps);
|
||||
}
|
||||
|
||||
private handleClick = (e: React.MouseEvent<PropType>) => {
|
||||
|
Reference in New Issue
Block a user