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

☂️ Lean Core #23313

Closed
46 of 64 tasks
cpojer opened this issue Feb 6, 2019 · 198 comments
Closed
46 of 64 tasks

☂️ Lean Core #23313

cpojer opened this issue Feb 6, 2019 · 198 comments
Assignees
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. ☂️ Umbrella To label issues that serve as coordination point and drivers for tasks in the react-native repo Ran Commands One of our bots successfully processed a command. Type: Discussion Long running discussion.

Comments

@cpojer
Copy link
Contributor

cpojer commented Feb 6, 2019

For the past several months we have been discussing and making progress on a project called “Lean Core”. Please read our motivation for this project. Over the years React Native has accumulated a lot of parts that are now outdated, unused or otherwise legacy. It's time to clean everything up and put the repository into a much more manageable state going forward.

This is an umbrella task intended to track all the work necessary to reach the goal of a leaner core, including work around repository reorganization. This issue is being kept up to date so new items will be added and completed ones will be (re)moved. Some of the items will spawn separate issues to track work. If you don't see a name assigned to any of the below items and you would like to help out, please volunteer in the comments and reach out to me to get started!

Components & Runtime

React Native currently comes with a large number of components, many of which are deprecated or outdated but they still part of the repository and increase the size of applications. For items in this section we are either looking to completely remove things if they are unused, or we'd like to move them either to community managed repositories or otherwise to facebookarchive. The list here is partially based on an awesome investigation by @axe-fb. The migration can be done roughly by following @matt-oakes's guide from further below: #23313 (comment)

Third-Party Dependencies

Over the years we have amassed a large amount of dependencies, especially JavaScript. We have also moved things out of React Native, like Metro and the react-native-cli. This means we left a large amount of tooling dependencies in our package.json, many of which will are unused by RN itself and won't be updated to the latest versions, causing the full install of React Native to be bloated. It would also be great to do an audit of all the dependencies that are used and identify which ones could be removed.

  • JavaScript Dependencies
    • Check which dependencies are large and whether they can be made smaller
    • Figure out which dependencies can be upgraded to their latest versions for security fixes
    • Figure out which dependencies can be deduplicated (= reduce version mismatches) for smaller install size
  • Move React Native code to external dependencies
    • Identify which JavaScript code could be better served by a third-party package instead of maintaining a copy or our own implementation

Repository Structure

Right now the React Native repository is a large repository with little organization that promotes separation of concerns. It is our goal as part of this effort to also move things into a more manageable structure. As part of this, we'd like to follow a monorepo model that consists of multiple smaller packages. This will be a gradual migration and we will only be tracking the initial work to get this off the ground.

  • Provide an initial setup that works with the existing repository, with multiple packages and also plays nicely with Facebook's internal setup (@cpojer)
  • TODO: Identify more work necessary in this area

Completed work

Click to see prior work before this issue was created
@jdmunro
Copy link
Contributor

jdmunro commented Feb 6, 2019

@cpojer I'd like to remove SnapshotViewIOS 🔪

@krizzu
Copy link

krizzu commented Feb 6, 2019

Hey @cpojer, thanks for putting it all together!

I'm willing to tackle few issues, starting from moving AsyncStorage.

@matt-oakes
Copy link
Contributor

I would be happy to help with moving NetInfo to a community repo.

Would it be best to create a personal Github repo first and then potentially migrate that to the react-native-community org once it's ready, or should we start right away with a repo in that org?

@wellmonge
Copy link
Contributor

wellmonge commented Feb 6, 2019

@cpojer, I'd like to help at some of this issues, could I start with "Merge AlertIOS with Alert"?

@cpojer
Copy link
Contributor Author

cpojer commented Feb 6, 2019

That's awesome! I put your names down next to the items above.

@jdmunro can you send a PR and assign me to it? Then I can take it over and remove FB specific stuff before landing.
@krizzu and @matt-oakes I created https://github.com/react-native-community/react-native-async-storage and https://github.com/react-native-community/react-native-netinfo for you to send PRs against with all the code necessary to make them third-party modules. Ideally in the first step, you'll just take the code from the RN repo and put them in separate repos. In order to ensure it works, we could then link them back into RN as a dependency and remove the original implementation. Further down the line we can actually move it to an optional package.
@wellmonge Sounds great! I'm not sure entirely what the work will entail but maybe you can just check out the two modules and see if you can unify them?

@michalchudziak
Copy link
Contributor

michalchudziak commented Feb 6, 2019

@cpojer I could help with moving slider 🙂

After that I can pick up something else if you’ll still need some help

@cpojer
Copy link
Contributor Author

cpojer commented Feb 6, 2019

@michalchudziak Awesome! I created https://github.com/react-native-community/react-native-slider, please see my comment above on what to do next.

As a name for the project in package.json, please use @react-native-community/<project name>, ie. @react-native-community/slider.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Feb 6, 2019
@facebook facebook deleted a comment from react-native-bot Feb 6, 2019
@cpojer cpojer added Help Wanted :octocat: Issues ideal for external contributors. and removed Bug Report Ran Commands One of our bots successfully processed a command. labels Feb 6, 2019
@ferrannp
Copy link
Contributor

ferrannp commented Feb 6, 2019

@cpojer I can take ViewPagerAndroid. I think better moving it to a community repo (if you can create the repo for me, thx 😄) than just removing it because other packages around have implemented this behaviour on JS for iOS and they relay on the native one for Android.

@jainkuniya
Copy link
Contributor

Hey @cpojer I would like to help by merging and moving Picker and PickerIos. :)

@cpojer
Copy link
Contributor Author

cpojer commented Feb 6, 2019

@ferrannp created https://github.com/react-native-community/react-native-viewpager for you! See the messages above.
@jainkuniya thanks! Not exactly sure what that will look like but maybe you can see how to unify them and start sending small PRs to react native.

@wellmonge
Copy link
Contributor

That's awesome! I put your names down next to the items above.

@jdmunro can you send a PR and assign me to it? Then I can take it over and remove FB specific stuff before landing.
@krizzu and @matt-oakes I created https://github.com/react-native-community/react-native-async-storage and https://github.com/react-native-community/react-native-netinfo for you to send PRs against with all the code necessary to make them third-party modules. Ideally in the first step, you'll just take the code from the RN repo and put them in separate repos. In order to ensure it works, we could then link them back into RN as a dependency and remove the original implementation. Further down the line we can actually move it to an optional package.
@wellmonge Sounds great! I'm not sure entirely what the work will entail but maybe you can just check out the two modules and see if you can unify them?

Sure! I'll do that and report to you.

@dmtrKovalenko
Copy link
Contributor

Can help with StatusBarIOS and PushNotificationIOS

@matt-oakes
Copy link
Contributor

@cpojer Do you have a preference for the Android package name?

Using NetInfo as an example it is currently com.facebook.react.modules.netinfo. Should we make it standard across all extracted modules with something like com.reactnativecommunity.modules.netinfo?

@kdenz
Copy link

kdenz commented Feb 6, 2019

Can I help with

  • Move SegmentedControlIOS to a community repo
  • Move ProgressViewIOS to a community repo

@vonovak
Copy link
Collaborator

vonovak commented Feb 6, 2019

I'll take the checkbox, please.

@react-native-bot

This comment has been minimized.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Feb 6, 2019
@kelset kelset added the Good first issue Interested in collaborating? Take a stab at fixing one of these issues. label Feb 6, 2019
Hiccup19940325 pushed a commit to Hiccup19940325/reactnative_package that referenced this issue Oct 30, 2023
Hiccup19940325 pushed a commit to Hiccup19940325/reactnative_package that referenced this issue Oct 30, 2023
Hiccup19940325 pushed a commit to Hiccup19940325/reactnative_package that referenced this issue Oct 30, 2023
Hiccup19940325 pushed a commit to Hiccup19940325/reactnative_package that referenced this issue Oct 30, 2023
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
Anticipate the removal of ART from React Native core:
facebook/react-native#23313

Simplifies dependencies and builds for web apps.

Close #1251
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
smartDev420 pushed a commit to smartDev420/ReactNative-Web-App that referenced this issue Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. ☂️ Umbrella To label issues that serve as coordination point and drivers for tasks in the react-native repo Ran Commands One of our bots successfully processed a command. Type: Discussion Long running discussion.
Projects
None yet
Development

No branches or pull requests