Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 Upgrade #183

Merged
merged 9 commits into from
Apr 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions @types/alltypes.d.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,4 @@
declare module 'react-page-layout';

declare module 'react-perf-tool';
declare module 'react-prism';
declare module 'react-router-dom';
declare module 'velocity-animate';

declare module 'hoist-non-react-statics' {
import {ComponentClass} from 'react';

function hoistNonReactStatics<P>(to: ComponentClass<P>, from: ComponentClass<any>): ComponentClass<P>;
export = hoistNonReactStatics;
}

// declare module "react-css-themr" {
// import React = require("react");
// type TReactCSSThemrTheme = {
// [key: string]: string | TReactCSSThemrTheme
// }

// export function themeable(...themes: Array<TReactCSSThemrTheme>): TReactCSSThemrTheme;

// export interface IThemrOptions {
// /** @default "deeply" */
// composeTheme?: "deeply" | "softly" | false,
// }

// export interface ThemeProviderProps {
// innerRef?: Function,
// theme: {}
// }

// export class ThemeProvider extends React.Component<ThemeProviderProps, any> {
// }

// interface ThemedComponent<P, S> extends React.Component<P, S> {
// }

// interface ThemedComponentClass<P, S> extends React.ComponentClass<P> {
// new(props?: P, context?: any): ThemedComponent<P, S>;
// }

// export function themr(
// identifier: string | number | symbol,
// defaultTheme?: {},
// options?: IThemrOptions
// ): <P, S>(component: (new(props?: P, context?: any) => React.Component<P, S>) | React.SFC<P>) => ThemedComponentClass<P, S>;
// }
1 change: 0 additions & 1 deletion @types/react-addons-perf.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion @types/velocity-animate.d.ts

This file was deleted.

4 changes: 3 additions & 1 deletion config/jest/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"setupFiles": [
"<rootDir>/config/jest/shim.js",
"<rootDir>/tests/setup.ts"
],
"testRegex": ".test.(tsx?|js)$",
Expand All @@ -21,5 +22,6 @@
},
"moduleNameMapper": {
"\\.(s?css)$": "identity-obj-proxy"
}
},
"verbose": true
}
9 changes: 9 additions & 0 deletions config/jest/shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Fixes an error where requestAnimationFrame wouldn't be available and throw:
//
// console.error node_modules/fbjs/lib/warning.js:33
// Warning: React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers. http://fb.me/react-polyfills
//
// See https://github.com/facebook/jest/issues/4545
global.requestAnimationFrame = (callback) => {
setTimeout(callback, 0);
};
9 changes: 1 addition & 8 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import ReactDataExample from './ReactDataExample';
import SingleDatePickerWrapper from './SingleDatePickerWrapper';
import DateRangePickerWrapper from './DateRangePickerWrapper';
import PickerAutoSuggestExample from './PickerAutoSuggestExample';
Expand Down Expand Up @@ -507,13 +506,7 @@ class App extends React.Component<{}, State> {
<Link>Tooltip 2</Link>
</Tooltip>
<div>

<ReactDataExample
columns={this.state.columns}
rowGetter={this.rowGetter}
rowsCount={this.state.rows.length}
minHeight={2}
/> */}
*/}
<Heading>Popover</Heading>
<TextField
id="TestName"
Expand Down
42 changes: 0 additions & 42 deletions example/src/ReactDataExample.js

This file was deleted.

5 changes: 2 additions & 3 deletions example/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import * as ReactPerfTool from 'react-perf-tool';
import App from './App';
import BaseTheme from '../../themes/Delicious/index';

const Perf = require('react-addons-perf');
const REACT_VERSION = React.version;

ReactDOM.render(
<BaseTheme>
<div>
<label>React Version: {REACT_VERSION}</label>
<App />
<ReactPerfTool perf={Perf} />
</div>
</BaseTheme>,
document.getElementById('root'),
Expand Down
Loading