Bundling React Native during Android release builds

Bundling #reactnative during Android release builds

  • Again, the sample project is the key, look at the sample app’s build.gradle file.Notice the config section:/** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets).
  • By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server.
  • * * project.ext.react = [ * // the name of the generated asset file containing your JS bundle * bundleAssetName: “index.android.bundle”, * * // the entry file for bundle generation * entryFile: “index.android.js”, * * // whether to bundle JS and assets in debug mode * bundleInDebug: false,…*/These values allow…
  • gradle file, we were able to hook into the bundling command on all our release builds.Our config:// Configures the bundleJS commands for React-Nativeproject.
  • ext.react = [ // whether to bundle JS and assets in debug mode bundleInDebug: false, // whether to bundle JS and assets in release mode bundleInRelease: true, // the root of your RN project, i.e. where “package.json” lives root: from: “path to RN this, we can correctly build our signed,…

I would have expected this to be a straightforward, well documented workflow, but was unfortunately a bit disappointed. It took a bit of digging to finally automate bundling process within our release
Continue reading “Bundling React Native during Android release builds”

Modern static site generation

  • There is this function called Server Side Rendering where you can produce static HTML content directly from a tree of React.js components.
  • At the time of reading this, this site will already be served by GitHub pages and the content you will see once you view the source it’s been generated by Gatsby.js.
  • Here’s my list:

    At the time that I started following them, all of them were in a very early stage and none of them could generate my site’s content the way I wanted and in the same way as my previous one so to not lose paths and certain functionalities.

  • Think of when you are caching the home page of a WordPress powered site and you are serving the cached content to every visitor.
  • Imagine that instead of having memcached caching your HTML in front of your WordPress site, you trigger a hook each time your database changes that will re-generate the frontend using Gatsby.

In this post, I will talk about static site generators. How they have evolved and why I switched from a Ghost powered site to Gatsby.js, a modern static site generator.
Continue reading “Modern static site generation”

React-based UI frameworks – Prototyping: From UX to Front End

React-based UI frameworks  #webdesign #uidesign #webdevelopment #react #javascript #reactjs

  • Most of these are meant more as a window into process (and as a recruiting tool) than as an open standard that other developers can use, but the principles are the same: a reusable library of components with standardized markup.Having a strong design system and a frontend architecture that’s designed to support it is incredibly powerful.Today, even more of the frontend stack has evolved toward a modular, component-based architecture.
  • Here’s the markup for the Feedback component in MailChimp’s library:div class=”feedback-block warning section” role=”status” div class=”lastUnit size1of1″ div class=”c-media” div class=”c-mediaImage v-isFreddicon” span class=”freddicon warn-circle”/span /div div class=”c-mediaBody–centered” h4Account status /h4 p You closed your account on Nov 29, 2013 07:00 pm /p /div /div /div/divDepending on the component, you may also need to include a JS file to handle any interactivity or other logic the component needs.In React, the markup and logic for this component would be defined in only one place, so rendering it would look something like this:Feedback type=”warning” title=”Account status” You closed your account on Nov 29, 2013 07:00 pm/FeedbackReact’s templating system is JSX — this concise version will get translated into the same markup as the top example in the browser.
  • The great thing about this system is that if the keepers of the MailChimp design system wanted to change this component, they’d just change it in one place — the JSX for rendering it would stay the same.
  • In the old world, updating the uses of this component would be a messy and error-prone find-and-replace operation.Having a strong design system and a frontend architecture built around it is incredibly powerful.
  • More importantly, users benefit from a predictable system that works the same everywhere across an app — every time I see a Feedback block in MailChimp it looks and works exactly the same, so my brain spends less effort understanding what’s happening and more on whatever I’m actually trying to accomplish.The list of React-based UI frameworks is steadily growing.

There’s a new crop of web UI frameworks in town, in the grand tradition of Bootstrap, a framework developed at Twitter. Five years ago, Bootstrap was not only an easy way to put together a UI that…
Continue reading “React-based UI frameworks – Prototyping: From UX to Front End”

How to Be A JavaScript Developer – Ken Rogers – Medium

How to Be A JavaScript Developer  #meteor #javascript #webdevelopment #react #reactjs

  • But I’ve always found that the best way to learn web development is to just build things.Meteor is a great way to get started just building things.It’s become a little more complex since its early days, but with the right setup and direction, it can still be a great way to bootstrap reactive applications.I think it’s a fantastic way to get started learning JavaScript development, or branch out into a new framework if you’ve already been using JavaScript for a while.So I wanted to put together this little guide that will serve as a potential path to learning web development with Meteor and React.All of these are resources that I have personally used and have served me well in learning.
  • Learn ES2015This free walkthrough of ES2015 does a great job of introducing you to the basics and walking you through how to use all of the new shiny things.Step 2 — Learn MeteorAlright, now that you’re familiar with JavaScript and its new syntax and capabilities, it’s time to dive in to Meteor.The Meteor TutorialThe official tutorial from Meteor.
  • The Meteor GuideAfter you’ve been introduced to Meteor with the tutorial, dive in to the guide to learn how to structure your project, and to get some more in depth knowledge on the finer points of MeteorStep 3 — Learn ReactSo you’ve got a decent handle on Meteor, not let’s dive into React.The React DocsThe official React docs do a good job of introducing you to the concepts and how to think in a React-ish way.2.
  • It also comes with GitHub source code so you can use it as an example.Phase 2 — BuildStep 1 — Experiment with BaseNow that you’ve got a good grasp on how to develop using Meteor and React, it’s time to start building things.Base is a Meteor boilerplate project to help you bootstrap your Meteor projects.It’s built with React and also uses React Router.In my opinion, downloading Base and digging into it, hacking on it, and using to as the starting point for your own project is one of the best ways to learn development with Meteor.By digging into Base, you’ll get an idea of best practices when building things with Meteor and React, and you’ll be able to use it as a template for building projects.Using the books and courses from the Learn phase as your foundation, you’ll be able to understand how Base is put together and how it all works.Really take the time to dig into every different component and figure out how everything is working.
  • Resist the urge to bounce around from framework to framework, constantly switching to whatever seems coolest.Instead, find problems that need to be solved, figure out a way to solve them with web applications, and then find the proper tool for the job.One of the most important skills for a professional developer is being able to build usable applications that solve real problems for real people.If you can find examples of those out in the wild, and build up a portfolio of yourself solving those with web apps, you’ll be indispensable.So now that you know the basics of JavaScript development with Meteor and React, I want you to get out there and start using that knowledge to solve real problems.Share that knowledge and those solutions with others.

A few years ago, I stumbled on a video of somebody making a responsive, real-time web app using something called Meteor. If you haven’t seen it yet, I recommend giving it a watch. It was pretty…
Continue reading “How to Be A JavaScript Developer – Ken Rogers – Medium”

What’s Happening with Navigation in React Native? – Revisify

What’s happening with navigation in React Native?  #JavaScript #ReactJS

  • What’s Happening with Navigation in React Native?There’s something nice about the background image…When I began learning React Native the docs and developers said that to handle navigation between scenes in your app you should use Navigator and a depreciated component, NavigatorIOS, was no longer recommended.
  • After seeing a post on the React Native subreddit and then doing some digging, I found out that Navigator and NavigationExperimental will be depreciated in favour of one last library React-Navigation.
  • It’s all a bit of a mess but I will clear everything up from what I’ve found while building my app.NavigatorIOSThe first solution to navigation in React Native was NavigatorIOS.
  • Like NavigatorIOS and Navigator, NavigationExperimental is being depreciated.React NavigationThe new recommended solution is React Navigation which hopes to overcome the issues of the previous solutions.
  • It also has support for deep linking.Navigation in React Native has been a mess, but the developers in the community are doing a great job at finalising a long-term solution with React Navigation.

When I began learning React Native the docs and developers said that to handle navigation between scenes in your app you should use Navigator and a depreciated component, NavigatorIOS, was no longer…
Continue reading “What’s Happening with Navigation in React Native? – Revisify”

Building single page Apps with React.js

Building single page Apps with React.js
☞

  • If you have frequently changing state or props that you pass down to a component as spread attributes, you may be unnecessarily re-rendering your component.
  • So something to keep in mind when deciding whether a component needs all the changing props and state it may receive.
  • import ClassNames from ‘classnames’ class Icon extends Component { getClassNames() { return ClassNames([ ‘fa’, {fa-`this.props.name`}, this.props.className ]); } render() { return ( ); } }
  • class Icon extends Component { getClassNames() { let classes = `fa fa-${this.props.name}`; if (this.props.className) { classes += ` ${this.props.className}` } return classes; } render() { return ( ); } }
  • I’m very glad I stumbled upon the concept of container components because I’m positive it saved me from creating some very messy React code.

I thought I would write up a few words on my experience with React so far (about 5 months of the publish date of this post) and some conventions
Continue reading “Building single page Apps with React.js”

How Intuit Leverages React & React Native

Woot! #reactjs React Native #SanDiego #meetup is Wed, 8/31 @Intuit -  w/ @geirmanc

  • Unit Testing React Components by Brian Hardy – Principal Software Engineer Target: Intermediate/Advanced
  • Building my first react/redux application.
  • Leveraging React / React-Native @ Intuit by Jay Yu – Distinguished Architect Target: Beginner/Intermediate
  • Safeguard your react applications from being broken inadvertently after modifications.
  • The talk will include: what problems we are solving for, how we pivot and switch the direction to React / React-Native, preliminary results via demos, as well as learnings from our journey so far.

Read the full article, click here.


@SocialAC: “Woot! #reactjs React Native #SanDiego #meetup is Wed, 8/31 @Intuit – w/ @geirmanc”


I'm overwhelmed with the response we had to the latest, relaunch of this meetup. James did a great job. If you missed it, you can watch it on youtube here. We had over 100 RSVPs. Still, I think w


How Intuit Leverages React & React Native