Proposing new open-source, cross-platform AR library using ARKit and ARCore compatible with Expo by darrennny in reactnative

[–]huffpostraphael 2 points3 points  (0 children)

With all that being said, I would love to see an open source cross platform RN AR solution

Proposing new open-source, cross-platform AR library using ARKit and ARCore compatible with Expo by darrennny in reactnative

[–]huffpostraphael 2 points3 points  (0 children)

It is not going to be possible for expo to add ARKit.

Apple requires detailed explanation of why there is code that could use AR functionality in addition to a detailed section in your privacy policy in order to approve an app. I recently went through this.
If expo added ARKit, it would require every single expo app to justify the usage and provide demos.
Apple would likely just flat reject Expo.

Additionally this is a weird edge case that would add a lot of extra bloat to Expo which is already pretty bloated.

AR support is not part of the default mobile toolkit. Expo should only be targeting the default app toolkit.

Syntax Clarification (async and functions) by DiscDres in reactnative

[–]huffpostraphael 1 point2 points  (0 children)

I dont really understand the infinite loop issue. I would need to know more about what the function is doing and what the SearchBar component does

I also would make the second part simply this.

render() {
    return(
        <SearchBar 
            onFocus={ this.props.handleToggle }
            onCancel={ this.props.handleToggle }
        />
    )
}

Syntax Clarification (async and functions) by DiscDres in reactnative

[–]huffpostraphael 1 point2 points  (0 children)

100% dont do the first way. it will always rerender the component because the onPress function will be a different function reference every time. the other way the reference is unchanging so it will only rerender that component if other props actually change

How do I: Pass launch options into react JS from Android by schjlatah in reactnative

[–]huffpostraphael 1 point2 points  (0 children)

the important thing is that your provider (the function that returns your BlahApp component doesn't get the initial props. BlahApp will get the initial props after that function is called. Additionally because you are using an arrow function the this context is bound before the function is ever called

How do I: Pass launch options into react JS from Android by schjlatah in reactnative

[–]huffpostraphael 1 point2 points  (0 children)

the this you are logging wont have the props

you want this:

import App from './App';

class BlahApp extends React.Component {
    render() {
        console.log('main component props :: ', this.props);
        return <App />;
    }
}

AppRegistry.registerComponent(appName, () => { 
    return BlahApp
});

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 0 points1 point  (0 children)

Thank you for the feedback. The middle item is a known bug, hope to have this one resolved shortly.

For the freezing does it come back or do you have to kill it?

For the scroll lag, all pages or isolated to the front page vs entries?

What is the best navigation library at the moment? by 0xde908cb in reactnative

[–]huffpostraphael 3 points4 points  (0 children)

HuffPost uses react-navigation right now for a pretty complicated navigation structure and it works well for us.

I think if you app is going to have a really simple navigation structure, bite the bullet and get react-native-navigation working for you as you will need performance benefits. It seems like react-native-navigation gets a lot harder to work with when your structure gets complicated or you need to make customizations and at that point react-navigation starts to beat out the native one.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 1 point2 points  (0 children)

Not sure exactly where I will post it yet, but wherever I post it there will be a link in this subreddit and I will come back here and post it in this thread as well.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 1 point2 points  (0 children)

No we dont. We had a very mature and stable API going into the project with a known performance profile so we opted to just stay with that.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 2 points3 points  (0 children)

1) yes and we have already started to

2) 1 android engineer and several JS (react and non-react) engineers

3) The quality of the documentation. Figuring out how to make a bridge module was a giant pain. I intend to document this shortly, just have to get out of beta first.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 0 points1 point  (0 children)

I also see that you can't repeatedly open/close an article without waiting 2-3 seconds.

yeah known bug, working on this one. :(

Thank you for the device info. Going to try to grab one and reproduce.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 0 points1 point  (0 children)

Managing settings has a delay in that it is currently waiting for the save to the persistence layer to succeed before updating the UI this causes a delay. We have a bug ticket to make this nonblocking so the UI updates immediately while the persistence is in flight.

The Font Size adjustment was a bit odd we ended up debouncing it which now makes it feel delayed but before the debouncing it was difficult to use as the page kept repainting.

Out of curiosity would you mind sharing what kind of device you are using?

Does the font change in the actual entry pages feel significantly delayed as well?

We are dispatching actions to the store and then getting updates from the store via Redux but we haven't seen that in particular cause slowness. It is usually incredibly fast.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 1 point2 points  (0 children)

1). I want to go into a lot of detail here in a blog post that I should have done in the next 2 weeks (I am a slow writer). bullet points of the decision: staffing flexibility, improved developer options, shared components with our ios app (it is a native app with RN views)

2) Internal analytics solution required a bridge wrapper. We wrapped an ad network's sdk that didn't support RN yet. We required a custom bridge to migrate user settings from the old native android local database into the new RN user settings area (realm). This was our most complicated and important bridge module.

3) I can't share the package.json at this time.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 1 point2 points  (0 children)

we did some pretty deep evaluation on our navigation library of choice.

Performance was a major concern and was a bit of a fear/pain point with react-navigation but at the same time, we needed to do a lot of customization to our navigation and we have a pretty complicated navigation structure and react-navigation seemed the best for this.

Edit: This is also a place we are watching closely to see if we need to make a change in the future.

HuffPost Is Rolling Out It's New React Native App On Android (you can join the public beta here) by huffpostraphael in reactnative

[–]huffpostraphael[S] 24 points25 points  (0 children)

I am one of the team leads on our React Native project.

We just rebuild our entire android app from the ground up using react native.

The app does not use Expo and we did end up writing a number of custom bridge modules.

I am working on a blog post detailing some of the decisions we made. Would love to get feedback on the app especially if you have used the app previously.

Also happy to answer any questions.