Skip to content

Add support for iOS 14/Android Homescreen Widgets #250

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

Open
mrousavy opened this issue Jun 23, 2020 · 5 comments
Open

Add support for iOS 14/Android Homescreen Widgets #250

mrousavy opened this issue Jun 23, 2020 · 5 comments
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject

Comments

@mrousavy
Copy link
Member

Introduction

Yesterday (June 22nd) Apple held it's yearly WWDC. They announced Widgets for the Homescreen, which can display small amount of information about your app. The photos app for example, shows recently added photos. Wheather app shows current wheather. Android had this concept of Widgets for a long time now, so I'd assume it would make sense for a unified way of creating widgets using React Native.

Details

Apple has a good documentation on Widgets here, and the Android docs can be found here. They are both similarily structured, which makes a cross-platform approach pretty logical.

It would make sense to create a React Native Component which is very lightweight (memory limit?) to run for the widget, since all of the business logic is in the JS codebase anyways. When creating a Widget natively, you have to re-implement most of your business logic such as datafetching, etc. (or don't use React Native).

Discussion points

  • Should React Native support things other than the immediate app itself? The "Today's View" Widgets are not supported by React Native either, there's a separate library for this. (Which only supports iOS)
  • Is it too much effort?
  • Does it clutter up the codebase?
  • Is there enough demand?
  • Are we going to run out of memory if using JS + React in a small widget?
@kelset kelset added the 🗣 Discussion This label identifies an ongoing discussion on a subject label Jun 23, 2020
@mxmzb
Copy link

mxmzb commented Jul 18, 2020

Not sure how nobody else is discussing this atm, but here is my take:

My simple take on this is that for me RN is a platform and should be able to take care of all suitable features and functions (and therefore also widgets on iOS) of the underlying system.

Besides, the demand for this will be probably just huge. At some point, RN will have to bend to that will anyway, I guess. Better earlier, than later, so we can onboard new developers looking to build an app utilizing widgets + not lose developers who think they need widgets, but RN is just not an alternative.

@mrousavy
Copy link
Member Author

Even though those are valid reasons, we probably won't see this feature in react native core. There will be a library (maybe by react-native-community) to do this because of the "lean core" concept.

@mxmzb
Copy link

mxmzb commented Jul 18, 2020

Even though those are valid reasons, we probably won't see this feature in react native core. There will be a library (maybe by react-native-community) to do this because of the "lean core" concept.

Yeah, that totally makes sense. I didn't mean it has to be done in the core, either. @react-native-community scope is perfect IMHO

@safaiyeh
Copy link
Member

Hello @mxmzb and @mrousavy react-native-community is not going to be responsible to maintaining core libraries anymore you can see details here: #274

Any additional feature outside of react-native core, expect to take it on yourself to build out to support. There is an example for AppClip, there are tutorials on Android Home Screen widgets

@copperfox777

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject
Projects
None yet
Development

No branches or pull requests

5 participants