Skip to content

Convert components off of createReactClass #21581

Closed
@elicwhite

Description

As part of our goal to modernize and type our core components, we need to migrate off of createReactClass. This task is to track the work to remove createReactClass from our codebase.

We can only convert off of createReactClass if the components don't use any mixins. Step 1 and Step 2 were removing a few of the mixins. There are still a few mixins left and we will need to completely finish that before we can complete this issue.

However, we can at least get started by removing createReactClass from the components that currently don't use any mixins. The following is that list:

  • ReactAndroid/src/androidTest/js/ScrollViewTestModule.js
  • ReactAndroid/src/androidTest/js/UIManagerTestModule.js
  • RNTester/js/ListViewExample.js
  • RNTester/js/ImageExample.js
  • RNTester/js/TimerExample.js
  • RNTester/js/TextExample.ios.js
  • RNTester/js/ProgressBarAndroidExample.android.js
  • RNTester/js/PanResponderExample.js
  • RNTester/js/ListViewGridLayoutExample.js
  • RNTester/js/SwipeableFlatListExample.js
  • RNTester/js/ProgressViewIOSExample.js
  • RNTester/js/CameraRollView.js
  • IntegrationTests/LayoutEventsTest.js
  • IntegrationTests/ReactContentSizeUpdateTest.js
  • Libraries/Experimental/SwipeableRow/SwipeableRow.js

I got this list by running grep -L "mixins:" $(grep -l -r createReactClass .). None of these files seem to be convertible by the codemod provided by the react team.

I'm providing less instructions on this one because I think there are a lot of posts online about how to convert off of createReactClass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Help Wanted :octocat:Issues ideal for external contributors.JavaScriptResolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions