It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

Ask anything to Exponent

Exponent lets web developers build truly native apps that work across both iOS and Android by writing them once in just JavaScript. It's open source and free and uses React Native.

Ask Exponent about:

  • ExponentJS
  • Exponent XDE
  • React Native
  • Android & iOS app development

Hosted by:


Hi everyone! Thanks for joining in and asking great questions. If you want to chat with us more, feel free to join our Slack: http://slack.getexponent.com/ and give Exponent a try if you haven't already! http://getexponent.com/

Ask a Question

63 discussions

What are the top 3-10 things holding react-native back?

I think React Native works great already for many applications. Some things that are preventing it from gaining even wider applicability and adoption, I believe, are:

  1. ListView: no view recycling, so certain things (eg: contact views) are difficult and others (eg: feeds) use tons of memory.
  2. Gestures: difficult to have related gestures on a view, needs to be written monolithically right now using PanResponder.
  3. No high-quality, blessed solution for navigation -- this is problematic because the fragmentation leads to duplicated efforts and lots of confusion for newcomers. This is being addressed with react-navigation: https://github.com/facebook/react-native/wiki/Roadmap#core-libraries
  4. Many one-off native implementations of components that should just be implemented in JS. Often this is done because of some current limitation in React Native. For example: https://github.com/exponentjs/exponent/issues/14#issuecomment-262836018 -- rather than implementing a custom activity loading spinner natively, it would be better for people to find the underlying reason why they think they need to do that and resolve it. In this case it would be implementing Animated.loop and supporting useNativeDriver: true on it. This leads to people installing tons of libraries that end up not being maintained and having many more native dependencies than they need.

Reply to this…

Share your programming knowledge and learn from the best developers on Hashnode

Get started

Can you talk about Exponent's road map? What are your plans for custom components?

The Exponent project roadmap is guided by the needs of product engineers. The feedback and requests we get from Exponent developers helps prioritize our projects across our mobile apps, APIs, and developer tools. One part of our APIs we get a lot of questions about is native modules.

Currently with Exponent, you write just JavaScript and there are a lot of nice things about that! But sometimes you need some functionality that can only be invoked from native code, whether it’s a custom native component or a native API we haven’t bridged to JavaScript, like iOS’s HealthKit or Android’s Voice Actions. The surface area of the mobile platforms is really big and we know developers have such a wide set of needs so we want to give you a way to write native code if you need to while still getting Exponent’s APIs and tools.

Our approach to this is something we call ExponentView. This new API lets you embed Exponent within a traditional Android or iOS project. You keep Exponent APIs and still write most of your app in JavaScript, but since you’re working inside an Android or iOS project you can write native code if you truly need to. You also can link React Native packages from npm even if they include native code. So after you start developing on Exponent, ExponentView is your escape hatch if you find yourself needing custom native code, although we strongly recommend staying on Exponent if you can. ExponentView is currently in development and we believe it addresses a lot of developers’ needs.

We also believe that many apps can be written in pure JavaScript and part of our roadmap is to bridge more native capabilities so that you don’t have to. Engineers working on Exponent are often responsible for both Android and iOS so that we give you APIs that feel coherent and expose cross-platform behavior and platform-specific capabilities for when you need them. As Exponent’s APIs have grown, we’ve seen them accommodate more and more developers’ needs. With new native APIs and ExponentView both on our roadmap, we definitely have developers in mind!

Reply to this…

Are you ever gonna support web? With something like react-native-web?

I've been surprised by how much I like react-native-web. I actually find I prefer React Native development over React web development because of things like CSS-in-JS and having React feel more first class rather than just grafted onto the DOM. Excellent work by necolas.

I would be happy if someone build a tool for Exponent apps that would let them be easily targeted at the web via react-native-web, but we probably won't build it anytime soon.

We have a small team and our focus is supporting iOS and Android.

When people build for those things, there aren't always analogs for react-native-web that work, so lots of Exponent apps would feel really broken if you just tried to run them on a web browser with no changes.

A more straightforward way to target desktop computers would be for us to support the React Native on Windows and OS X targets. I'd love to do this as well, but its another thing we won't have time for anytime soon.

I do wish there was an easy solution to this though since so many developers end up frustrated when they have to build a mobile website and a mobile app, that end up slightly different. It would be a huge win for developers and users if it was possible to target iOS and Android native apps and also get a fully functional moblie website out of it as well; would be very tricky to get that right though.

Reply to this…

How do I become a badass programmer like you guys?

Eat your vegetables

Reply to this…

Thanks for doing this AMA. I am starting to explore React Native. What advantages will I get if I use Exponent as opposed to working with React Native directly?

Hi Justine! That's a great question, I'm glad you asked.

I think there are two key differences:

#1. Exponent provides a native runtime with a wide range of native APIs and components exposed out of the box, on top of those already included in React Native, so you only have to write JavaScript.

React Native itself gives you the core components that you need to build almost every app: Text, TextInput, View, Image, ScrollView, Switch, Slider, Touchable (the React Native equivalent of a link), ActivityIndicator, and a few more. It also gives you access to some useful APIs, like Geolocation and CameraRoll.

But what happens when you want to add a bar code scanner, map, Google sign in, Facebook sign in, video, fetch a user's contacts, add blur or gradient or OpenGL effects, SVG, push notifications, local notifications or sensors like gyroscope and accelerometer? In each of these cases, you will need to track down a native module that someone has implemented and published to npm, make sure it's actively maintained, install it in your project (not always easy! and you need to do it on both projects), update it each time you update React Native, or possibly just write it on your own in ObjC/Swift and Java.

So, we take care of this for you. Here's a list of some of the APIs that we support on top of React Native currently: https://docs.getexponent.com/versions/v11.0.0/sdk/index.html On Friday we'll publish another update that includes a handful more, and every release this grows. We test the APIs and update them for you, you don't have to think about installation except where an API key is required (eg: Google sign in), and you can expect it to just keep working as you update. If we do make some breaking changes, we'll list them in our release notes and you can update at your convenience.

#2. Makes React Native development even more like web development, for example in terms of publishing and sharing.

With Exponent, as soon as you create a project anybody in the world can open it on their phone and watch your changes live. When you want to deploy it, run exp publish or hit publish in our development tool called XDE -- this will give you a permanent URL that anybody with the Exponent app can access. If you want to deploy it through the App Store and Play Store, run exp build:ios and exp build:android and we'll give you the store-ready binaries, then all you need to do is upload them (we'll be automating this part in the future too!).

It's really incredible how liberating this is -- to be able to share native mobile experiences in the same way that you would share websites. We (and increasingly, other people in the React Native community) use this all the time to share examples on the React Native Community Facebook group (https://www.facebook.com/groups/react.native.community/), for example:

We want to make building and sharing mobile experiences as fun and frictionless as it can be, we see ourselves as philosophically similar to now.sh and Ruby on Rails -- we want to remove the incidental complexity so you can just build cross-platform apps, no hassle.

So why would you ever use React Native without Exponent? Currently with Exponent, you can't write native code -- just JavaScript. If you the APIs with provide you with aren't enough, this might be necessary. We're working on solving this though! https://blog.getexponent.com/answered-on-slack-ejecting-from-exponent-154bdca57dc1#.7pv1qlakn

Reply to this…

Load more responses