Has anyone considered writing or forking 'Blaze Native' à la React?


#1

Last Friday I wrote a simple ios-native replacement for the HTML5 Video Element in plain JS + swift. Looking at the compiled template code from Blaze, I got thinking it should be relatively easy to write equivalent replacements for DIVs and other HTML elements to have some kind of ‘Blaze Native’, much the same as React Native.

As far as I’m aware React Native started with a similar premise, and I like the design decisions they’ve made (run the JS via JSCore, not from a webkit view, put a development focus on layout with flexbox etc.) They seem to be doing a great job.

People more familiar with the Blaze and React Native codebases: is there anything I’m missing stopping us from forking React Native and using it as a native layer to run a (if basic at first) meteor app?


#2

I think forking React Native would be a colossal mistake. Instead if you really want to use handlebars to write view logic it would be better to use something like sideburns that lets you write Blaze but it transpiles to React… letting you utilize the massive efforts with React/React-Native while still writing Blaze syntax?

You should be able to do this with webpack (instead of the built in packager) and then use a sideburns webpack loader to create the React components. CSS files could be transformed into JS CSS and then could be inlined.

Just wondering why would handlebars be better for writing iOS/Android views? React only takes a weekend to learn and gives you more flexibility to use logic in a view. It’s much more ‘web’ like than Cocoa or Android.

BTW, you can also use the Node DDP adapter to subscribe to a Meteor publish for real time data in React Native (works rather well!)


#3

Can you recommend any resources for learning React-Native?


#4

Sure, this is what I used to start out: https://egghead.io/series/react-native-fundamentals
The same author also has a desktop web version using just React that’s worth doing too. Both are very good!