Commit 2151d78e authored by Shen Chang's avatar Shen Chang

style: fix KeepAlive.tsx and useKeepAliveEffect.tsx TSLint Error

parent a6c65439
{ {
"name": "react-keep-alive", "name": "react-keep-alive",
"version": "2.0.0.alpha.0", "version": "2.0.0-alpha.0",
"description": "Package will allow components to maintain their status, to avoid repeated re-rendering.", "description": "Package will allow components to maintain their status, to avoid repeated re-rendering.",
"author": "Shen Chang", "author": "Shen Chang",
"homepage": "https://github.com/Sam618/react-keep-alive", "homepage": "https://github.com/Sam618/react-keep-alive",
......
...@@ -25,9 +25,9 @@ class KeepAlive extends React.PureComponent<IKeepAliveInnerProps> { ...@@ -25,9 +25,9 @@ class KeepAlive extends React.PureComponent<IKeepAliveInnerProps> {
private ref: null | Element = null; private ref: null | Element = null;
private refNextSibling: null | ChildNode = null; private refNextSibling: null | Node = null;
private childNodes: ChildNode[] = []; private childNodes: Node[] = [];
public componentDidMount() { public componentDidMount() {
const { const {
......
import React, {useEffect, useContext, useRef, useState} from 'react'; import React, {useEffect, useContext, useRef} from 'react';
import {warn} from './debug'; import {warn} from './debug';
import {COMMAND} from './keepAliveDecorator'; import {COMMAND} from './keepAliveDecorator';
import IdentificationContext, {IIdentificationContextProps} from '../contexts/IdentificationContext'; import IdentificationContext, {IIdentificationContextProps} from '../contexts/IdentificationContext';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment