Live data from Hacker News

Exponent – Build native apps in JS that work across both iOS and Android

getexponent.com

91–100 of 119 posts

Re: Exponent – Build native apps in JS that work across both iOS and Android

#91
post #70

I tested out React Native on Android the other day and it was a real disaster. It doesn't compile for all the CPU ABIs (instruction sets) we have, so if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely. You have to remove all your own libraries for unsupported architectures, then modify your build not to include them, then depend on those platform's compatibility features to…

I'm using react-redux 4.4.5 in React Native app, no problems at all.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#92
post #89

I'm interested in the game example. How is that built exactly? Is the game built in React Native (I presume not) or is React Native just used for UI elements? If so, what is the game built with?

Hey! I made floatyplane. The source code is here: https://github.com/exponentjs/floatyplane

Here's a video of a talk explaining how the game works: https://www.youtube.com/watch?v=2_KV7Ha_gRk

The game runs on Exponent and uses React Native for rendering (as all Exponent apps do). It uses individual `Image` components for each sprite. This gets choppy when you have a lot of sprites so we're experimenting with more performant ways of rendering for games.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#93
post #70

I tested out React Native on Android the other day and it was a real disaster. It doesn't compile for all the CPU ABIs (instruction sets) we have, so if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely. You have to remove all your own libraries for unsupported architectures, then modify your build not to include them, then depend on those platform's compatibility features to…

Some of these issues don't apply to Exponent: > if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely We handle all the native code for you, so you'll never hit this. > half the examples and half the dependencies on the web out there crash immediately because they decided you have to import React and Component from "react" instead of "react-native" now We support multiple Reac…

> We handle all the native code for you, so you'll never hit this.

How do you handle that exactly?

Re: Exponent – Build native apps in JS that work across both iOS and Android

#94
post #92
post #89

I'm interested in the game example. How is that built exactly? Is the game built in React Native (I presume not) or is React Native just used for UI elements? If so, what is the game built with?

Hey! I made floatyplane. The source code is here: https://github.com/exponentjs/floatyplane Here's a video of a talk explaining how the game works: https://www.youtube.com/watch?v=2_KV7Ha_gRk The game runs on Exponent and uses React Native for rendering (as all Exponent apps do). It uses individual `Image` components for each sprite. This gets choppy when you have a lot of sprites so we're experimenting with more per…

Wow, thank you very much! Response from the developer with source code and talk. Couldn't wish for more. Thanks again!

Re: Exponent – Build native apps in JS that work across both iOS and Android

#95
post #88

This looks really nice. I have a question about React Native though. I was under the impression that React Native meant that you could just take your components from your website and build an app out of it. I'v realized that's not the case. What is the benefit of React Native if you can't share the components?

You can share some components, especially more abstract ones. For example, react-redux creates higher-order components that work with both React DOM and React Native. There's also a project called react-native-web that implements React Native's View components using React DOM's primitive components (https://github.com/necolas/react-native-web).

Components aside, you can share your models and data stores, utilities like Immutable.js and lodash, and other environment-agnostic JavaScript. In addition to code, you can share a lot of knowledge like how to write components, structure an app, use npm, and even just write JavaScript.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#96
post #88

This looks really nice. I have a question about React Native though. I was under the impression that React Native meant that you could just take your components from your website and build an app out of it. I'v realized that's not the case. What is the benefit of React Native if you can't share the components?

The benefit is basically that you build native quality components in Javascript, which saves you from needing to learn new programming languages and frameworks for each platform. Also some components are actually reusable, the custom ones built by RN team, others are platform specific.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#97
Check out re-natal [0] if you are interested in using react native with clojurescript. Re-frame (cljs's redux?) and reagent (cljs's react wrapper) are a joy to use and clojurescript with REPL is something I'd pick over plain JS almost any day.

Give it a try! It's pretty solid.

[0]: https://github.com/drapanjanas/re-natal

Re: Exponent – Build native apps in JS that work across both iOS and Android

#98
post #88

This looks really nice. I have a question about React Native though. I was under the impression that React Native meant that you could just take your components from your website and build an app out of it. I'v realized that's not the case. What is the benefit of React Native if you can't share the components?

You can share some components, especially more abstract ones. For example, react-redux creates higher-order components that work with both React DOM and React Native. There's also a project called react-native-web that implements React Native's View components using React DOM's primitive components ( https://github.com/necolas/react-native-web ). Components aside, you can share your models and data stores, utilities…

Well, you've convinced me. I'm trying this out. Thanks!

messutied, you're shadowbanned so I can't reply but thank you for your response!

Re: Exponent – Build native apps in JS that work across both iOS and Android

#99
post #93

Earlier quoted context omitted.

Some of these issues don't apply to Exponent: > if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely We handle all the native code for you, so you'll never hit this. > half the examples and half the dependencies on the web out there crash immediately because they decided you have to import React and Component from "react" instead of "react-native" now We support multiple Reac…

> We handle all the native code for you, so you'll never hit this. How do you handle that exactly?

I'd assume it means you have to use their api rather than directly import native apis.

Re: Exponent – Build native apps in JS that work across both iOS and Android

#100
post #70

I tested out React Native on Android the other day and it was a real disaster. It doesn't compile for all the CPU ABIs (instruction sets) we have, so if you have native libraries for x86 or arm 64 in your app it immediately breaks it completely. You have to remove all your own libraries for unsupported architectures, then modify your build not to include them, then depend on those platform's compatibility features to…

Why is the top comment on every story a negative one? Is nothing good anymore?

People probably don't like constantly reading about how some large SV player pushed its half-assed ideas through to the public despite the pain it causes.

If the wheel you reinvented is square, you might run into someone who doesn't quite buy into your pitch of this being the future of technology.

Post reply on HN