
Hippy: React Native Alternative by Tencent - Jarred
https://github.com/Tencent/Hippy
======
K0nserv
I opened a random file(HippyBridge.h[0]) and it looks very similar to React
Native's RCTBridge.h[1] which leads me to believe Hippy is either a fork of
React Native or heavily "inspired" by it. A lot of the comments and symbols
match React Native's 1-to-1.

EDIT: I've read through more of the source and compared it to React Native.
Like Jarred mentioned[2] it probably started out as a fork of React Native.

0:
[https://github.com/Tencent/Hippy/blob/master/ios/sdk/base/Hi...](https://github.com/Tencent/Hippy/blob/master/ios/sdk/base/HippyBridge.h)

1: [https://github.com/facebook/react-
native/blob/master/React/B...](https://github.com/facebook/react-
native/blob/master/React/Base/RCTBridge.h)

2:
[https://news.ycombinator.com/item?id=21877857](https://news.ycombinator.com/item?id=21877857)

~~~
unityByFreedom
If it is a react native fork, I wonder if they plan to acknowledge that. Seems
like that is the first thing you'd mention.

I can't see a reason not to mention this unless you're trying to fool someone.

~~~
yorwba
They do acknowledge using code from Vue:
[https://github.com/Tencent/Hippy/blob/e284c6b399e50bfb256469...](https://github.com/Tencent/Hippy/blob/e284c6b399e50bfb256469072dd8afdb8cd0e13b/LICENSE#L205)

~~~
unityByFreedom
Not from react, which is what parent comment was talking about. That they
acknowledge code use from another source is irrelevant.

~~~
yorwba
It's not irrelevant, since that makes it more puzzling why they'd acknowledge
one project but not another.

~~~
unityByFreedom
Perhaps bc Evan You is Chinese.

------
yonibot
Looks like they haven't put up much documentation yet - hard to say what this
is really.

How do you work with different platforms? How does the performance compare to
React Native? Can we see examples? What APIs exist to access native
functionalities? How complete is the Flex implementation?

~~~
Jarred
I dug around a little and installed their demo app in the iOS simulator:
[https://www.dropbox.com/s/hl3nk8jrcjleurj/hippy.mov?dl=0](https://www.dropbox.com/s/hl3nk8jrcjleurj/hippy.mov?dl=0).
Visually, the only interesting part of the demo app is the RefreshWrapper
example

Code-wise, the most interesting things I've seen:

\- They expose wrappers for native recycling list views[0]. React Native does
this in JavaScript through VirtualizedList, however some have experienced
performance issues with it[1]

\- They wrote their own flexbox layout library[2] (likely based on Yoga)

\- It works with both Vue[3] and React

\- Hippy supports web as a build target out of the box[4] (react-native-web is
a 3rd party library)

\- Touch events work on the `<View />` component directly, instead of needing
to wrap `<View />`'s in the `<Touchable />` components[5]

\- It uses a closed-source fork of libv8 on Android called X5[6].

The API & coding style is quite similar to React Native, but the
implementation seems different. I'm guessing this started as an internal fork
of React Native and turned into a large refactor, but that's just a guess

[0]:
[https://github.com/Tencent/Hippy/blob/master/ios/sdk/compone...](https://github.com/Tencent/Hippy/blob/master/ios/sdk/component/listview/HippyBaseListView.m)

[1]: [https://github.com/facebook/react-
native/issues/13413](https://github.com/facebook/react-native/issues/13413)

[2]:
[https://github.com/Tencent/Hippy/tree/master/layout](https://github.com/Tencent/Hippy/tree/master/layout)

[3]:
[https://github.com/Tencent/Hippy/tree/master/packages/hippy-...](https://github.com/Tencent/Hippy/tree/master/packages/hippy-
vue)

[4]:
[https://github.com/Tencent/Hippy/tree/master/packages/hippy-...](https://github.com/Tencent/Hippy/tree/master/packages/hippy-
react-web)

[5]:
[https://github.com/Tencent/Hippy/tree/master/packages/hippy-...](https://github.com/Tencent/Hippy/tree/master/packages/hippy-
react#migrate-from-react-native)

[6]:
[https://github.com/Tencent/Hippy/issues/9#issuecomment-56822...](https://github.com/Tencent/Hippy/issues/9#issuecomment-568228569)

~~~
dnate
> \- It uses a closed-source fork of libv8 on Android called X5[6].

this makes my spidey senses tingle. What might be hidden there?

~~~
GeoffIsTheBest
I agree. If Facebook had a closed source lib in RN it would be DOA.

I would be very curious to know why and if there are plans to replace with
open source.

------
nkkollaw
I don't think it would be easy to push the switch to management: "We'd like to
rewrite our React Native up to use Hippy..."

------
dazhbog
_Hippy is now applied in 18 Tencent apps concerning tens of billions of
ordinary users._

Having used a lot of these apps I wonder if this is indeed what they use to
deliver near native experience with web technologies..

~~~
CGamesPlay
Where did they find the extra 2.5 billion people?

~~~
K0nserv
They are probably talking about unqiue users in each app. 10b/18 ≈ 555m per
app which isn't unreasonable for Tencent.

~~~
curist
According to their chinese doc, the number is actually "multiple hundred
millions", so it's more likely just a translation issue.

------
chvid
I think it is really great to see the Chinese internet giants releasing some
of their software as open source.

In a time of geopolitical "tech wars" open source culture could easily become
collateral damage.

~~~
verttii
Or a weapon.

~~~
chvid
How is that?

~~~
natch
Tencent is one of the companies responsible for China’s dystopian sesame
credit scheme, for one. I would not want to contribute to any of their
projects.

~~~
yorwba
Sesame Credit is operated by Ant Financial, a subsidiary of Alibaba. They're a
competitor to whatever credit scoring Tencent does for their forays into
micro-lending.

~~~
natch
Bringing in the Tencent credit scoring for micro-lending is muddying the
issue. Possibly I’m guessing an intentional move on their part to limit the
damage from their association with Sesame Credit.

As I understand it Tencent has worked closely with the Chinese government to
enable its social media properties like WeChat to feed data into Sesame Credit
on a massive scale. This is a project that they support and enable, and I
believe in the early days they were also one of the companies that helped to
develop it, regardless of who currently operates it on paper.

------
calmworm
"New React Native"

------
d0100
I won't use this probable spyware, however I do hope that some RN competition
can make RN grow, and be, a bit faster.

~~~
FooBarWidget
Why speculate on whether it is spyware? Read the source and verify it for
yourself. If there is spyware I would appreciate a link to the relevant lines.

~~~
natch
How do you read the source of a closed source library? I mean sure reverse
engineering is possible but it’s a bit flippant to suggest that everyone has
time to do this. Even if it did not have closed source libraries, it’s a bit
much to assume everyone affected can understand the source.

We already know that tencent engages in bad stuff on behalf of the Chinese
government (Sesame Credit as a concrete example) so they shouldn’t be presumed
innocent right out of the box.

What’s wrong with existing cross platform frameworks? You have to wonder what
their agenda is for creating this.

~~~
yorwba
> Sesame Credit as a concrete example

Sesame Credit is not a Tencent project. If you're going to get facts wrong, at
least don't repeat them more than once.
[https://news.ycombinator.com/item?id=21879422](https://news.ycombinator.com/item?id=21879422)

> You have to wonder what their agenda is for creating this.

Career advancement for everyone on the list of contributors.

~~~
natch
I believe that when it started out they were also working on it, but I’ll
admit to not having a source at the moment. Would not be surprised if all
evidence of their involvement has been wiped from the internet though.

In the meantime I’m pretty sure they fully cooperate with the Chinese
government in supplying data to the Sesame Credit system through their social
media properties like WeChat. Something that more ethical competitors like
WhatsApp have refused to do.

------
wilt
Anyone done a security audit on this yet?

~~~
bnt
Why?

~~~
gigatexal
The Chinese state perhaps including backdoors to spy on users?

~~~
rat9988
I guess we should do the same about any open source project. I don't know a
state who has proven to be reliable.

~~~
shrimpx
Any state could spy on users but china is known to blatantly do so.

~~~
tirpen
To be fair, so is the US (NSA) , but people rarely suggest that packages from
the US should be monitored extra closely for some reason.

Of course _every_ package used in any code that contains sensitive data should
be audited along with its dependant, but I see no reason to be more afraid of
this particular package than anything people happily install from npm.

~~~
Vesuvium
There's a good reason for that: US does not really need to put backdoors in
software to spy. They have the largest tech companies under their legislation
and can already force them to disclose information on users. Most companies
won't argue and hand over things silently.

They have international agreements with a number of countries for
surveillance.

This means that unless an app is completely hosted, in all parts from source
code to production, in a privacy-friendly country, on servers provided by a
privacy-friendly company and the app is made by a company in similar
conditions, the US and EU have all they need.

~~~
jjeaff
While there have been some serious breaches of trust, US companies have a
track record of fighting governments openly in court to avoid sharing data
with them.

Chinese companies absolutely do not have this track record. Chinese companies
are essentially an extension of the heavy hand of the Chinese Communist Party.

------
mechnesium
Disconcerting and suspicious to see so many Chinese codebases being advertized
here. I feel that there is some nation state activity behind it. There is a
ban on Chinese work products in sensitive industries (aerospace/defense,
military, and government), and other industries should follow suit if they
care about security.

~~~
dang
Please do not copy/paste comments on HN. That strictly lowers the signal/noise
ratio.

Also, your comment breaks the site guideline against insinuating astroturfing,
shillage, etc., without evidence. I replied to you about that here:
[https://news.ycombinator.com/item?id=21879877](https://news.ycombinator.com/item?id=21879877).
Please don't do it again.

