From 7035e00267715c2ef6067cb0fdba80bb15959517 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 19 Jan 2023 11:30:00 -0600 Subject: [PATCH] Remove react-immutable-pure-component --- app/soapbox/components/autosuggest-input.tsx | 3 +-- app/soapbox/components/autosuggest-textarea.tsx | 3 +-- app/soapbox/components/emoji-selector.tsx | 3 +-- package.json | 1 - yarn.lock | 5 ----- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/soapbox/components/autosuggest-input.tsx b/app/soapbox/components/autosuggest-input.tsx index 1228901129..9f067c0328 100644 --- a/app/soapbox/components/autosuggest-input.tsx +++ b/app/soapbox/components/autosuggest-input.tsx @@ -2,7 +2,6 @@ import { Portal } from '@reach/portal'; import classNames from 'clsx'; import { List as ImmutableList } from 'immutable'; import React from 'react'; -import ImmutablePureComponent from 'react-immutable-pure-component'; import AutosuggestEmoji, { Emoji } from 'soapbox/components/autosuggest-emoji'; import Icon from 'soapbox/components/icon'; @@ -36,7 +35,7 @@ export interface IAutosuggestInput extends Pick { +export default class AutosuggestInput extends React.PureComponent { static defaultProps = { autoFocus: false, diff --git a/app/soapbox/components/autosuggest-textarea.tsx b/app/soapbox/components/autosuggest-textarea.tsx index 1cdc7fa06f..1c576743ec 100644 --- a/app/soapbox/components/autosuggest-textarea.tsx +++ b/app/soapbox/components/autosuggest-textarea.tsx @@ -1,7 +1,6 @@ import { Portal } from '@reach/portal'; import classNames from 'clsx'; import React from 'react'; -import ImmutablePureComponent from 'react-immutable-pure-component'; import Textarea from 'react-textarea-autosize'; import { textAtCursorMatchesToken } from 'soapbox/utils/suggestions'; @@ -33,7 +32,7 @@ interface IAutosuggesteTextarea { children: React.ReactNode, } -class AutosuggestTextarea extends ImmutablePureComponent { +class AutosuggestTextarea extends React.PureComponent { textarea: HTMLTextAreaElement | null = null; diff --git a/app/soapbox/components/emoji-selector.tsx b/app/soapbox/components/emoji-selector.tsx index be0ca3a51c..3e418831c9 100644 --- a/app/soapbox/components/emoji-selector.tsx +++ b/app/soapbox/components/emoji-selector.tsx @@ -1,7 +1,6 @@ // import classNames from 'clsx'; import React from 'react'; import { HotKeys } from 'react-hotkeys'; -import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import { getSoapboxConfig } from 'soapbox/actions/soapbox'; @@ -22,7 +21,7 @@ interface IEmojiSelector { focused?: boolean, } -class EmojiSelector extends ImmutablePureComponent { +class EmojiSelector extends React.PureComponent { static defaultProps: Partial = { onReact: () => { }, diff --git a/package.json b/package.json index 06f47abdc8..ff630e5724 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,6 @@ "react-helmet": "^6.1.0", "react-hot-toast": "^2.4.0", "react-hotkeys": "^1.1.4", - "react-immutable-pure-component": "^2.2.2", "react-inlinesvg": "^3.0.0", "react-intl": "^5.0.0", "react-motion": "^0.5.2", diff --git a/yarn.lock b/yarn.lock index a1fb69a9bb..ed5005b21f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9443,11 +9443,6 @@ react-hotkeys@^1.1.4: mousetrap "^1.5.2" prop-types "^15.6.0" -react-immutable-pure-component@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz#3014d3e20cd5a7a4db73b81f1f1464f4d351684b" - integrity sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A== - react-inlinesvg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-inlinesvg/-/react-inlinesvg-3.0.0.tgz#801c6bac1535334586708cd346f4b1125dcfa8f9"