How to do end-to-end testing on React Native with Detox

  • They are being performed on matched elements.Expect verifies if a certain value is as expected to be.As we can see detox covers a lot of possible user interactions that can be automated.Make our tests more readableTo be honest, we can do much better.First let’s get rid of the duplication for matchers…
  • Automate the process and land on the moon 🚀Once we reached a certain amount of tests, we thought it could be nice to automate the process and think in terms of “continuous testing”.
  • That’s why we decided to run the end-to-end test on our build server.Every new pull request that comes in, triggers unit tests with Jest on CircleCI and now also our end-to-end tests on Bitrise (our build server).
  • This is mostly due to the Detox build scripts.AlternativesWe also considered others libraries such as:Appium which is a cross platform test library where tests can be written in many languages (node, ruby, java, … ).
  • Hence, our choice of using Detox.ConclusionIn this article we saw how to handle Detox and its API, how to automate everything with Bitrise (or any CI that can runs an IOS Simulator).

When we started writing our React-Native app at Home, testing was something we took seriously from day one. While it was easy to setup a proper unit-tests workflow with Jest and Typescript, we figure…
Continue reading “How to do end-to-end testing on React Native with Detox”

How I built a Content Management System for a React app in one day

How to Build a #ContentManagement System in just 1 day!


#JavaScript #React #Reactjs #CMS

  • DYI content management system with Firebase  ReactHow I built a Content Management System for a React app in one dayFirebase + React = Quick DIY CMSThere are two ways of handling website content:Use a CMS.Hard code in the copy/image urls in the code itself.Option number 2 quick at first, and is fine…
  • However, two big problems will surface and grow as companies scale.In fact, I have personally experienced multiple times the first of these two problems at work.Problem 1: time wasted by engineerEvery time there needs to be a content change, the product team would need to ping an engineer, and the engineer…
  • This will definitely be a problem if the company ever goes international in non-English speaking countries.SolutionThe solution to these two problems is a good content management system.Pillow, where I’m currently working, had a Hackathon last week.
  • Anyone can signup for an account with their gmail, create a project, and add data to the database.Because of the NoSQL structure, I thought it would be a great way to store website copy.
  • This is what I did to structure Pillow’s landing page copy during the Hackathon:Screenshot of json data structurePillow’s website is already built with React, and that made my job a lot easier.All I needed to do on that front is install re-base, set up some configuration, and replace the hard…

Option number 2 quick at first, and is fine for an early stage startup operating in one country. However, two big problems will surface and grow as companies scale. Every time there needs to be a…
Continue reading “How I built a Content Management System for a React app in one day”

5 simple steps to quickly start a new VR project – Hacker Noon

  • This will tell git to ignore the node_modules folder and the final bundled javascript file.Step 2: Create a file structureIn project, there will be two main components, a client and a server.
  • Since this project will use webpack to bundle the react code, add another two folders into the client folder, and name them ‘src’ and ‘dist’Step 3: Creating the ServerThis will create a Node/Express server that will serve the client whenever the url is called.Create a file inside the server folder and name it index.js.Inside terminal, type yarn install and press enter.
  • Inside the terminal type: touch webpack.config.js, then add this into the file:var path = require(‘path’);var SRC_DIR = path.join(__dirname, ‘/client/src’);var DIST_DIR = path.join(__dirname, ‘/client/dist’);module.exports = { entry: `${SRC_DIR}/index.jsx`, output: { filename: ‘bundle.js’, path: DIST_DIR }, module : { loaders : [ { test : /\.
  • Go to the terminal and type yarn build and after it’s done, type yarn start .
  • In the terminal, type:yarn add aframe aframe-react add this into index.jsx (this code is copied directly from aframe-react official repo):import React from ‘react’;import ReactDOM from ‘react-dom’;import ‘aframe’;import {Entity, Scene} from ‘aframe-react’;import ‘babel-polyfill’;import App extends React.Component { render () { return ( Scene Entity geometry={{primitive: ‘box’}} material={{color: ‘red’}} position={{x: 0, y: 0, z: -5}}/ Entity particle-system={{preset: ‘snow’}}/ Entity light={{type: ‘point’}}/ Entity gltf-model={{src: ‘virtualcity.gltf’}}/ Entity text={{value: ‘Hello, WebVR!’}}

A-Frame is a great way to get into developing VR, especially for those who come from a Javascript background. For those who dont know what A-Frame is, here is the official description taken directly…
Continue reading “5 simple steps to quickly start a new VR project – Hacker Noon”

React Vs Polymer – Rayn Studios – Medium

React Vs Polymer  #frontenddevelopment #polymer #react #javascript #reactjs

  • In React, I wrote every single component from scratch.
  • I know that there are components, designed by the community, for React as well but I did not really feel the need to use a third party component.React: +1 for SimplicityReact is easy to pick up and being productive from the get-go.
  • the idea that you can mutate the bindings from both the parent and the child, actually gives you nightmares, while debugging, if you are not careful enough.Often times, I was confused about the data flows and abrupt states, my components were in, due to the fact that I was mutating the binding from the parents and the children, based on my own logic.
  • not total, but that’s how I felt, many a times.Enter React, along with its ideologies of props and states.
  • Projects made with Polymer look quite good and are very accessible, due to Polymer elements following Material Design Ideology very strictly.On the other hand, React provides you with nothing, more than vanilla CSS, if you know how to use that properly.

I’ve been building apps for five years now but I’ve dabbled in Single Page Applications (SPAs), only in 2016, when I had to build a dashboard for my app startup Pollen Chat. Recently I released a new…
Continue reading “React Vs Polymer – Rayn Studios – Medium”

Congratulations on 🌟50,000🌟 stars, @reactnative! Here’s to the next 50,000 🥂

  • Another great way to learn more about the components and APIs included with React Native is to read their source.
  • The React Native documentation only discusses the components, APIs and topics specific to React Native (React on iOS and Android).
  • For further documentation on the React API that is shared between React Native and React DOM, refer to the React documentation.
  • If you encounter a bug with React Native we would like to hear about it.
  • For help and questions with using React Native please make use of the resources listed in the Getting Help section.

react-native – A framework for building native apps with React.
Continue reading “Congratulations on 🌟50,000🌟 stars, @reactnative! Here’s to the next 50,000 🥂”

Why React Native is the Best Choice for Making Native Apps

  • The React Native CLI lets you start a new native app project that will work on both iOS and Android.
  • One of my favorite features of React Native app development is live reload.
  • React Native builds upon React’s philosophy of “Learn once, write anywhere,” making it easy for React web developers to build native apps.
  • Composable unified UI codebases, instant app updates, and better development tooling make React Native the better way to make native apps.
  • And if you want to check out a great example of a React Native app for data visualization, Victory UI Explorer by Angela Nicholas is one of my favorite Formidable projects.

Composable unified UI codebases, instant app updates, and better development tooling make React Native the better way to make native apps.
Continue reading “Why React Native is the Best Choice for Making Native Apps”

Speaker: Nader Dabit: O’Reilly Fluent Conference, June 19

  • •  (800) 889-8969 or (707) 827-7019  •  Monday-Friday 7:30am-5pm PT  •  All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
  • • 
    confreg@oreilly.com

Nader Dabit is the founder of React Native Training and has been creating applications using React Native for over 2 years.
Continue reading “Speaker: Nader Dabit: O’Reilly Fluent Conference, June 19”