From ebb8c8920795a31a3188d39b926a5074bb8b69cf Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 30 Sep 2017 04:29:56 +0200 Subject: Upgrade to React 16 (#5119) * Upgrade to React 16.0.0 * Disable some uncritical tests while chai-enzyme remains incompatible --- app/javascript/mastodon/components/column_header.js | 4 ++-- app/javascript/mastodon/containers/mastodon.js | 2 +- app/javascript/mastodon/features/ui/index.js | 2 +- app/javascript/mastodon/performance.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index 05e1de705..e4fa8fa7a 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -135,7 +135,7 @@ export default class ColumnHeader extends React.PureComponent { return (
-

+

{title} @@ -145,7 +145,7 @@ export default class ColumnHeader extends React.PureComponent {

-
+
{(!collapsed || animating) && collapsedContent}
diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 884fc161a..31167cbd8 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -5,7 +5,7 @@ import configureStore from '../store/configureStore'; import { showOnboardingOnce } from '../actions/onboarding'; import BrowserRouter from 'react-router-dom/BrowserRouter'; import Route from 'react-router-dom/Route'; -import ScrollContext from 'react-router-scroll/lib/ScrollBehaviorContext'; +import { ScrollContext } from 'react-router-scroll'; import UI from '../features/ui'; import { hydrateStore } from '../actions/store'; import { connectUserStream } from '../actions/streaming'; diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index 2a55cfb4c..0e4796fcb 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -48,7 +48,7 @@ const mapStateToProps = state => ({ @connect(mapStateToProps) @withRouter -export default class UI extends React.PureComponent { +export default class UI extends React.Component { static contextTypes = { router: PropTypes.object.isRequired, diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js index 396c605e4..450a90626 100644 --- a/app/javascript/mastodon/performance.js +++ b/app/javascript/mastodon/performance.js @@ -14,8 +14,8 @@ if (process.env.NODE_ENV === 'development') { } marky = require('marky'); // allows us to easily do e.g. ReactPerf.printWasted() while debugging - window.ReactPerf = require('react-addons-perf'); - window.ReactPerf.start(); + //window.ReactPerf = require('react-addons-perf'); + //window.ReactPerf.start(); } export function start(name) { -- cgit