Query Components with Apollo – Kureev Alexey – Medium

  • After Apollo takes care of fetching and mapping props to query parameters, query component uses “function-as-a-child” approach to expose a child-independent API with injected data.Comparing to the standard approach were you add a graphql wrapper to your higher-order components, query components have a set of advantages:Testability.
  • Query Components abstracts out your data management layer so you can focus on business logic and change underlying implementation if needed.Once a Query Component is defined, it can be used as an any other component in your application:A nice side effect of decoupling higher-order components into Query Components is minimizing…
  • If the data management layer grows, it won’t affect presenter components unless they have to reflect new data properties.Mutations with Query ComponentsMutations are not that straightforward as queries.
  • For example:Therefore, you can use this component in a similar way:So the concept is the same: Query Component receives a bunch of props that are later on used as parameters for the mutation query.Testing Query Components like a Pro 😎How to test Query Components?When it comes to testing, Apollo-based components have…
  • In other words, we check if given data.x complies to the shape of the mock that was passed to the fake client during initialization.And the last, but not least: query component should call a children function with the data, pulled from Apollo.

A couple of months ago, we started to use Apollo Client (+React Native) at Werkspot. From the very beginning, Apollo overwhelmed us by the simplicity and flexibility it provides. It inspired us to…
Continue reading “Query Components with Apollo – Kureev Alexey – Medium”

How to make Jenkins build NodeJS, Ruby, and Maven on Docker

How To Make Jenkins Build #NodeJS, #Ruby, And #Maven On #Docker  #reactjs #devops

  • Jenkins can speed up repetitive tasks that robots are much better performing and Docker simplifies spinning up VM’s for your application in a very simple and repeatable way.
  • What I’m going to cover here is how to setup your Jenkins server in a Docker container and how to fix some of the limits of the Jenkins official image.
  • While it is nice of Jenkins to offer an official docker image, you’ll quickly run into a few issues if you are doing anything even slightly other than compiling plain Java.
  • For instance, Maven, the popular dependency management tool for Java, is not included in the Docker container.
  • You’ve learned to create a Jenkins Docker-container that’s ready to run jobs for Java, Ruby and NodeJS projects.

Setup your Jenkins server in a Docker container and fix some of the limits of the official image I discovered so you can get up and building faster.
Continue reading “How to make Jenkins build NodeJS, Ruby, and Maven on Docker”

Why I decided to move from Android to React Native – CloudBoost

Why I decided to move from Android to #reactnative

  • There were several reasons why I chose React Native as my new framework and I want to share with you which were these reasons :Frequently, I use some applications which are built with React Native such as Booking, Airbnb, Facebook and Instagram.
  • Their animations, performance and UI are almost native and It is difficult to feel and see difference between Android Native and React application.Another thing I saw was that big companies are starting implement and get involved on React Native.
  • But I could not say the same of React Native here is an example.I made a retrospective about all applications I have made so far in order to found which of them could not be built on React Native.
  • Common features I am talking about List, Sign in, Social Logins, Video player, Audio player, Image render, Forms, Tabs, Details views, Navigation and Animations.Write one and run everywhere, it is well know that if you write a React Native you can run on Android and iOS.
  • It’s also easy to build part of your app in React Native, and part of your app using native code directly — that’s how the Facebook app works.Sooner or later as Android Developer you will have to learn Kotlin.In conclusion, React Native is a framework cross-platform that has been well built and…

I have been an Android Developer for 4 years. During this time I have had the opportunity to development several Android applications. But since 2 months ago I started coding a new application called…
Continue reading “Why I decided to move from Android to React Native – CloudBoost”

React Components Explained – codeburst

  • Something like thisimport React from ‘react’;class MyComponent extends React.Component { render () { return div This is a component /div }}class MyOtherComponent extends React.Component { render () { return ( div MyComponent / /div ) }}This way you are able to compose more complex and useful user interface for your…
  • Component’s render method return JSX which then use to create real HTML output which will be rendered in the browser.The interesting Thing about render method is that it runs every time when your component State or Props updates.
  • Let me show you a exampleimport React from ‘react’;class MyComponent extends React.Component { constructor(props) { super(props); this.state = { name: “Manoj” }; } render () { return div My name is {this.state.name} /div }}// if we render this component the output will beMy name is ManojIgnore the super(props) (out of…
  • Let’s see an example.class MyComponent extends React.Component { constructor(props) { super(props); this.state = { name: “Manoj” }; this.changeName = this.changeName.bind(this); } changeName () { this.setState({ name: “Your Name” }); } render () { return div onClick={this.changeName} My name is {this.state.name} /div }}In the above code we are telling our React…
  • You can run this code on jsFiddle here.PropsVisualise props as options that can be passed to a component to customize its functionality.For example, I have a heading component which renders a heading with subtitle.class MyHeading extends React.Component { render () { return div h1This is a heading/h1 pSubtitle/p /div }}If…

The simplest library I ever used in my life is React. As you know React is based upon component design. Everything in React is a component which makes it easy to reuse components frequently. You can…
Continue reading “React Components Explained – codeburst”

ReactJS and The Future of Web Development

Check out why ReactJS is becoming popular in Web Development?  #WebDevelopment #ReactJS

  • ReactJS is an open source JavaScript library use to build interactive user interfaces for the websites and other applications.
  • ReactJS is becoming popular in web development.
  • So, if you’re looking to create web applications with interactive UI in quick-time, then ReactJS library suite is your best choice.
  • You can build interactive user interfaces quickly with ReactJS to save valuable time and money without compromising the functionality.
  • Also, you can render ReactJS on the server-side, which is another advantage of using ReactJS for web development.

ReactJS is an interactive framework which is very simple to use. It is easy to build interactive user interface (UI) with ReactJS as per user’s persona.
Continue reading “ReactJS and The Future of Web Development”

react-compound-slider — React compound slider | Next level slider component 🎰 #ReactJS

react-compound-slider — React compound slider | Next level slider component 🎰   #ReactJS

  • To install and save in your dependencies, run: – – This library takes a compound component approach to creating sliders that separates the data/logic from presentation.
  • The components use the function as child components pattern.
  • By taking this approach it also frees you up to render whatever markup you want to customize your slider.
  • In general slider components are composed of a relatively positioned outer div with elements absolutely positioned inside by a percentage.
  • In this library the , , and components are used as children to the component and they let you tap into a stream of values and percentages that you can then use to render your own components.

react-compound-slider – React Compound Slider | Next Level Slider Component :slot_machine:
Continue reading “react-compound-slider — React compound slider | Next level slider component 🎰 #ReactJS”