Using canvas with React Native – Over Engineering – Medium

Use canvas with React Native:  #ReactJS #JavaScript

  • Most of the work is in defining which methods and properties should be made public in React Native:Context uses the postMessage implementation, in Canvas; so the bridge is shared and all the queueing logic is reused.
  • When we call a method or set a property: canvas.webview.postMessage sends a message to a canvas in the Webview.
  • The Canvas component doesn’t expect a return message from this.If we need to call a canvas or context method, we call the method and send the serialized return value back.
  • This library has provided a way for me to access the canvas API, but I also need a way to load images from a remote source.The canvas API provides a drawImage method, which could accept another canvas (or a browser Image object) as a source.
  • So, I can now use either to load an image, and then make changes to the image; using the browser canvas API.That’s all, for nowI’ve enjoyed working with this library, so far.

React Native is the Wild West. There’s so much to discover and build, and it can be a fun journey. Sometimes, before you can start panning for gold, you have to make the tent you’re going to sleep in…
Continue reading “Using canvas with React Native – Over Engineering – Medium”

Using canvas with React Native – Over Engineering – Medium

Using canvas with React Native  #canvas #reactnative #react #reactjs

  • Most of the work is in defining which methods and properties should be made public in React Native:Context uses the postMessage implementation, in Canvas; so the bridge is shared and all the queueing logic is reused.
  • When we call a method or set a property: canvas.webview.postMessage sends a message to a canvas in the Webview.
  • The Canvas component doesn’t expect a return message from this.If we need to call a canvas or context method, we call the method and send the serialized return value back.
  • This library has provided a way for me to access the canvas API, but I also need a way to load images from a remote source.The canvas API provides a drawImage method, which could accept another canvas (or a browser Image object) as a source.
  • So, I can now use either to load an image, and then make changes to the image; using the browser canvas API.That’s all, for nowI’ve enjoyed working with this library, so far.

React Native is the Wild West. There’s so much to discover and build, and it can be a fun journey. Sometimes, before you can start panning for gold, you have to make the tent you’re going to sleep in…
Continue reading “Using canvas with React Native – Over Engineering – Medium”

Native Script and React Native Comparison – Viraj C – Medium

Native Script and React Native Comparison  #reactnative #react #nativescript #reactjs

  • Native Script and React Native ComparisonReact NativeWhether to develop a cross platform application as a native app or as a hybrid app is a crucial dilemma faced by application developers.
  • However, some still like to build applications using Native Script and couple it with Angular to enable cross platform experience.This article compares both the approaches for building cross platform applications and help derive a conclusion, as to which is a superior way of building more native application experience.Application development with React NativeReact Native is an application development tool launched by Facebook in March 2015.
  • React Native focuses on dirty rendering and speed of development to expedite cross platform application development.Angular JS 2 and Native Script App developmentNative Script is the basic tool used by developers for developing the code for an application.
  • Native Script app development essentially follows a more holistic approach, with lower level UI elements to make it transparent and repeatable between multiple mobile platforms.
  • Therefore, this approach is clearly not focused on speed and performance like React Native.Key DifferencesReact Native:Same base code is used to build apps for multiple platforms.Abstracts the business logic in order to support the different UI rendering on each platform.Applications have to interpret between multiple UI paradigms as they use the same code on different platformsEven though the application can be written in a platform-agnostic manner, React Native allows access to platform specific UI layer as well.Speed and Performance focus of React Native allows for hybrid applications to be ready and rendered very fast.Better suited for apps where the UI is complex, needs to be resource intensive, required lots of rendering and involves various custom elements.Native Script:Fundamentally follows the ‘write once, run anywhere’ approach.Focuses on creating a singular development experience, irrespective of the platform.Applications turn out to be more conceptually consistent due to the coupling with Angular JS 2, which has a declarative UI focus.Several UI elements are kept at a lower level in order to manage the UI transparently on multiple platforms.Dependence on Angular for driving the application’s architecture makes the app development slower than React Native.Ideal for generic, database powered apps that don’t require complex UI elements on multiple platforms.In conclusion, deciding which approach is better for developing a cross platform application can depend on the need and purpose of the application.

Whether to develop a cross platform application as a native app or as a hybrid app is a crucial dilemma faced by application developers. Ever since the launch of React Native, developers have…
Continue reading “Native Script and React Native Comparison – Viraj C – Medium”

React Native at WalmartLabs – WalmartLabs – Medium

Learn more about how Walmart uses #ReactJS Native:

  • Overall, we’re very happy with the performance of React Native far, and we’re hopeful that the results we’ve gathered will be met with approval from the business side, and ultimately our users.
  • We use our integration tests to ensure that our React Native code remains functional as the code base continues to evolve.
  • One challenge that React Native presents is that for the JS bundle to work, there has to be a compatible React Native counterpart on the native side.
  • To ensure the quality of our React Native code, we aim for 100% test coverage for both unit tests and integration tests.
  • We use unit tests to exercise our React Native components in isolation and prevent unintentional changes.

Here at Walmart, the customer is always #1, so we’re constantly on the lookout for ways we can improve upon the shopping experience we provide to our customers. The Walmart app, as it currently…
Continue reading “React Native at WalmartLabs – WalmartLabs – Medium”