React Native v0.40.0 Released

This is the first release with the new monthly cadence, so 0.40 is known as December 2016. The next version will be 0.41 - January 2017, and will be released at the end of the month.

Breaking Changes

iOS native headers moved

This change affects all native modules and application code on iOS that refer to react native .hfiles

After e1577df, Native code on iOS must refer to headers out of the react namespace. Previously the following would work:

#import "RCTUtils.h"

But now all headers have been moved:

#import <React/RCTUtils.h>

This means that all iOS native libraries need a major version bump for RN 0.40. We attempt to minimize changes of this magnitude, and we apologize for any inconvenience caused.

require(‘image!…’) no longer supported

Support for require('image!…'), which has been deprecated for a long time, is now removed. If you are still loading images that way in your apps, make sure to check the documentation for alternatives.

getTransformModuleOptions is removed

If you were having custom rn-cli.config.js in your app and for some reason, using getTransformModuleOptions, make sure to check @davidaurelio commit ca58e0a for details on the changes.

Android

Bugfixes

  • Fix WebView crash for links of unknown schemes (35e75c8) – @rigdern
  • Fix Overlay for Marshmallow 23+ (e335ca0) – @jpshelley
  • Stop silently failing for requires on Android (63eb4df) – @javache
  • Fix SamplingProfiler and HeapCapture for apps that lazy load react modules (d919eb7)
  • Call handleUpdateLayout even if the content didn’t change (fb23000) – @Kerumen

New features and enhancements

  • Add ability to specify main Activity in run-android (9fb520e) – @grabbou
  • Add disableExtractUI prop to TextInput on Android (1b870d2) – @rigdern
  • Add DatePicker mode configurations (eaccd7e) – @pandiaraj44
  • Enable apps to provide a custom configuration to Fresco (8b199a7) – @rigdern
  • Speed up EventEmitter emit() by ~50% (c4046d6) – @Venryx
  • Enable ad-hoc dependencies to be pre-downloaded (aac8daf) – @rigdern
  • Keep ScrollView content visible after edits (528a3c7) – @rigdern
  • Decrease cost of reflection (911c05a) – @rigdern
  • Update android gradle plugin version to 2.2.2 (3ee5c5b) – @raycohen
  • Expose Android’s includeFontPadding for Text (7b3e67d) – @benvium
  • Handle “Never Ask Again” in permissions and add requestMultiplePermissions (51efaab) – @cmcewen
  • Remove Jackson dependency (6fef014)
  • Remove REACT_HEADERS from RN BUCK file (9024998) – @javache
  • Implement onViewAppear by creating a new EventListener on ReactRootView listening for when it’s attached to a RN Instance (e06b8db) – @donyu

iOS

Bugfixes

New features and enhancements

General

Bugfixes

New features and enhancements

React Native v0.39.0 Released

React Native

Breaking changes

See this document for a complete list of breaking changes (three) and actions required.

General breaking changes

Android breaking changes

  • Move to new C-based implementation of css-layout in RN Android (d63ba47) – @astreet
  • Android: Fix inconsistency with fractional TextInput padding (aa85408) – @rigdern
  • Disable debug menu when monkey is running (9a8b5d9) – @rigdern

General bugfixes

General new features and enhancements

Android bugfixes

New Android features and enhancements

  • Expose setAllowUniversalAccessFromFileURLs in Android WebView (b6a38e8) – @locly
  • Update logging to support levels, print messages in Android logcat on assertion failures (a731a23) – @astreet
  • Proper NativeAnimated node invalidation on Android (6f5433f) – @ryangomba
  • Reduce overdraw layers by hiding cards when they are not visible (54beee2) – @rigdern
  • Expose Image’s onError event to JavaScript (e87e181) – @rigdern
  • Provide more info when image fails to load (d117f55) – @frantic

iOS bugfixes

  • Ensure notification payload is passed to completion handler (df6b8bd) – @npomfret

New iOS features and enhancements

Hyperloop Brings React and Ruby Together

Ruby on Rails

Hyperloop is a great approach for Ruby developers who want to use React but aren’t willing to spend a lot of time learning and mastering JavaScript. I have always liked Ruby and a language so I can imagine if I spent several years working in Ruby that I wouldn’t want to have to split my time between writing Ruby on the backend and then JavaScript on the frontend. So while I won’t be using Hyperloop, I think it could be great for Ruby devs. Although, the translation from Ruby to JavaScript could be tricky and/or cause compatibility issues in the future. Looking at the Get Started guide, I do like the elegance of writing Ruby code to implement React components:

class HelloWorld < React::Component::Base
  param :time, type: Time
  render do
    p do
      span { "Hello, " }
      input(type: :text, placeholder: "Your Name Here")
      span { "! It is #{params.time}"}
    end
  end
end

every(1) do
  Element["#example"].render do
    HelloWorld(time: Time.now)
  end
end

They have a bunch of great tutorials and one of the first ones I wanted to look at was how life-cycle methods are implemented. They changed things a bit and went with before_mount, after_mount, after_udpate instead of componentWillMount, componentDidMount and componentDidUpdate. Not exactly sure why they changed the methods.

Again, interesting concept and great for existing Ruby devs.

React v15.4.0 Released

Facebook React

The React team just announced the availability of React 15.4.0 – lots of changes with the major one being the explicit separation of React and React DOM. It should be a seamless change if you’ve been using a recent release of React. There’s also some updates to profiling your app in Chrome Dev Tools. The release notes can be found on GitHub, but here are the highlights:

React

  • React package and browser build no longer “secretly” includes React DOM. (@sebmarkbage in #7164 and #7168)
  • Required PropTypes now fail with specific messages for null and undefined. (@chenglou in #7291)
  • Improved development performance by freezing children instead of copying. (@keyanzhang in #7455)

React DOM

  • Fixed occasional test failures when React DOM is used together with shallow renderer. (@goatslacker in #8097)
  • Added a warning for invalid aria- attributes. (@jessebeach in #7744)
  • Added a warning for using autofocus rather than autoFocus. (@hkal in #7694)
  • Removed an unnecessary warning about polyfilling String.prototype.split. (@nhunzaker in #7629)
  • Clarified the warning about not calling PropTypes manually. (@jedwards1211 in #7777)
  • The unstable batchedUpdates API now passes the wrapped function’s return value through. (@bgnorlov in #7444)
  • Fixed a bug with updating text in IE 8. (@mnpenner in #7832)

React Perf

  • When ReactPerf is started, you can now view the relative time spent in components as a chart in Chrome Timeline. (@gaearon in #7549)

React Test Utils

  • If you call Simulate.click() on a <input disabled onClick={foo} /> then foo will get called whereas it didn’t before. (@nhunzaker in #7642)

React Test Renderer

  • Due to packaging changes, it no longer crashes when imported together with React DOM in the same file. (@sebmarkbage in #7164 and #7168)
  • ReactTestRenderer.create() now accepts {createNodeMock: element => mock} as an optional argument so you can mock refs with snapshot testing. (@Aweary in #7649, #8261)

GoPro Recalls 2,500 Karma Drones

GoPro Karma

Not a great series of updates from GoPro, from missing revenue expectations by 23% and now issuing a recall for 2,500 Karma drones which is GoPro’s newest product which enters the drone space. From the official announcement:

GoPro is committed to providing our customers with great product experiences. To honor this commitment, we have recalled Karma until we resolve a performance issue related to a loss of power during operation. We plan to resume shipment of Karma once the issue is addressed.

It’s a scary thought to have your $800 drone suddenly lose power while in the air and just start crashing to the ground. But another interesting point is that there has only been 2,500 drones sold. I’m curious how many people decided to go with the DJI Mavic instead of the Karma. I was leaning towards the Mavic personally but the price increase was making me a little hesitant. But with this news, I’m definitely a Mavic supporter now.

NodeJS v7.0.0 Released

NodeJS

NodeJS v7.0.0 has been released and we have finally moved on from the v6. I don’t think there are a ton of “major” changes here but I’m hoping v7 will become the defacto LTS version going forward. The updates for V8 are also promising and hopefully have some performance improvements. Here are the notable changes:

Buffer

  • Passing invalid input to Buffer.byteLength will now throw an error #8946.
  • Calling Buffer without new is now deprecated and will emit a process warning #8169.
  • Passing a negative number to allocUnsafe will now throw an error #7079.

Child Process

  • The fork and execFile methods now have stronger argument validation #7399.

Cluster

  • The worker.suicide method is deprecated and will emit a process warning #3747.

Deps

  • V8 has been updated to 5.4.500.36 #8317, #8852, #9253.
  • NODE_MODULE_VERSION has been updated to 51 #8808.

File System

  • A process warning is emitted if a callback is not passed to async file system methods #7897.

Intl

  • Intl.v8BreakIterator constructor has been deprecated and will emit a process warning #8908.

Promises

  • Unhandled Promise rejections have been deprecated and will emit a process warning #8217.

Punycode

  • The punycode module has been deprecated #7941.

URL

  • An Experimental WHATWG URL Parser has been introduced #7448.

You can take a look at what the HackerNews community is saying about the latest release here.

Leaflet JS for Mobile Friendly Maps

Leaflet

I’m a little behind on blogging, so this is a little old but it’s definitely worth mentioning again. If you’re building web apps and need map capabilities, you should definitely take a look at Leaflet. Leaflet is now at v1 so that’s a great sign for anyone using Leaflet. I also like how the first item on the changelog is that they have made major performance improvements. It’s a great sign from the team when that’s the first thing the highlight. The full list of changes in this release are:

  • Huge performance improvements in all aspects of the library and vector layers in particular.
  • New L.Tooltip class for all your dynamic labeling needs.
  • Flyover animations (zooming and panning in a curve with map.flyTo).
  • Fractional zoom level support (map.setZoom(12.34)).
  • Much better tile loading algorithm with less flickering.
  • Custom pane management (including multiple vector layer panes and interleaving vectors and tile layers).
  • Better support for non-standard projections.
  • More accessibility features.
  • Vastly improved documentation.
  • Tons of bugfixes and stability improvements.

The update also discusses a new release cycle to help improve the speed of releases. After paying down some major technical debt, it looks like the team will start to release more updates frequently. And it’s great to see that they’re already releasing more often. Leaflet v1.0.1 has already gone out.

And there are some other initiatives they are going to pursue:

  • A cleaner, more stable plugin ecosystem. We want to make sure that all popular plugins work well with the latest release and are maintained. We’ll revise our plugin list page, tighten our review process, take more key plugins under the wing of the Leaflet organization on GitHub and spend more time working on them.
  • Tutorials and examples to cover more advanced features of the library, its popular plugins, and integrations with libraries like D3 and React/Angular.
  • Explore switching to a more modern JavaScript flavor and module system (ES6, Babel, Rollup).
  • Map rotation support.

DJI Mavic Pro Now Available for Pre-order $999

DJI just announced their answer to the GoPro Karma and it’s smaller with more features but also costs more. I really like how the Mavic has a vision system that can track people (and animals apparently). Based on the teaser video, I like the compactness of the Mavic and its controller. It’s not pocketable, but it looks like it could fit into an existing bag and not requires a special carrying case like the Karma. I think another big selling point will be DJI’s experience with drones compared to GoPro’s late entry into the crowded market. Take a look at the review from TechCrunch:

I think overall I would pick the Mavic over the Karma. The features, extra compactness and DJI backing make the price increase worth it. I guess this means that my bank account will be $1k lighter in the near future.

React v15.3.2 Released

React

Another day and another release from the React team. React v15.3.2 looks mostly to be performance improvements and bug fixes. This is pretty similar to the v15.3.1 release. Nothing game-changing but I do appreciate somewhat frequent updates (about a month apart). Full list of updates/fixes are:

React

  • Remove plain object warning from React.createElement & React.cloneElement. (@spudly in#7724)

React DOM

  • Add playsInline to supported HTML attributes. (@reaperhulk in #7519)
  • Add as to supported HTML attributes. (@kevinslin in #7582)
  • Improve DOM nesting validation warning about whitespace. (@spicyj in #7515)
  • Avoid “Member not found” exception in IE10 when calling preventDefault() in Synthetic Events. (@g-palmer in #7411)
  • Fix memory leak in onSelect implementation. (@AgtLucas in #7533)
  • Improve robustness of document.documentMode checks to handle Google Tag Manager. (@SchleyB in #7594)
  • Add more cases to controlled inputs warning. (@marcin-mazurek in #7544)
  • Handle case of popup blockers overriding document.createEvent. (@Andarist in #7621)
  • Fix issue with dangerouslySetInnerHTML and SVG in Internet Explorer. (@zpao in #7618)
  • Improve handling of Japanese IME on Internet Explorer. (@msmania in #7107)

React Test Renderer

React Perf Add-on

  • Ensure lifecycle timers are stopped on errors. (@gaearon in #7548)

GoPro Karma Drone Unveiled and only $799

I think everyone has been wondering when GoPro would release a drone so this is definitely not a huge surprise. I will say the collapsible design looks nice and makes it far easier to carry around than other drones. I’m not sure how the front-mounted camera will do compared to the gimbal mounted cameras on the bottom of most drones but I’m sure there will be plenty of footage to compare. I’m also curious about the durability of the drone since GoPro is known for making pretty durable cameras so I’m hoping their drone is also top-notch. The price tag is definitely on the high side – especially considering the $799 doesn’t include a camera (GoPro Hero 3 and Hero 4 models are compatible). But a high price tag might mean this drone is actually a step above the others and it might be worth of my hard-earned money.

Definitely check out the video to see for yourself. And then answer the most important question: buy or wait?