Top 10 Web Development Articles This Week on Codeburst

  • Top 10 Web Development Articles This Week on CodeburstWhat’s trending in WebDev this week?
  • Hacktoberfest, async/await, Vue, Node, and JavaScriptWe’re midway through week two of Hacktoberfest.

Mark Muskardin explains the web share API: It’s a JavaScript API that let’s you implement native sharing capabilities from your Mobile Web App. So you have a Vue app you built with the vue-cli and…
Continue reading “Top 10 Web Development Articles This Week on Codeburst”

Developer Spotlight: Matt Cain – Cosmic JS – Medium

  • Developer Spotlight: Matt CainIn our latest installment of the Cosmic JS Developer Spotlight Series, we sat down with Matt Cain, a web developer who took a physics undergrad and spring-boarded into the world of Java, Rails and ultimately, programming language agnostic APIs.
  • In addition to his day job of being a Creative Director and writing code, Matt is a Cosmic JS Contributor and responsible for several apps and blogs in our ecosystem.
  • More recently, I was pretty satisfied with the Premium User Blog app I built for Cosmic JS.Talk a little bit more about your process for building apps, who they’re for, and how Cosmic JS has helped.
  • Cosmic JS being essentially a simple to use, one-stop-shop for everything I need to deploy is a blessing.What are some technologies you are excited about that you are using today, or want to learn more about?I’m excited about using PWA’s and integrating bots in sites more.
  • I’m very much looking foward to where AR goes.To learn how you can contribute apps, blogs and extensions to the Cosmic JS Community, contact us at support@cosmicjs.com.

In our latest installment of the Cosmic JS Developer Spotlight Series, we sat down with Matt Cain, a web developer who took a physics undergrad and spring-boarded into the world of Java, Rails and…
Continue reading “Developer Spotlight: Matt Cain – Cosmic JS – Medium”

React.js best practices and conventions

An opinionated guide to #ReactJS best practices and conventions:  #JavaScript

  • The following guidelines mostly focus on component structure and JSX.
  • However, by following a few general guidelines for handling JSX in components, it’s far more readable and not such an eyesore.
  • No matter how few elements are being returned, I choose to write any JSX which contains nested elements across multiple lines with indentation to enhance readability, i.e:

    Furthermore, while the parenthesis are not technically required with a single line JSX statement, I still use them for the sake of consistency (and because unrestrained elements floating about in my JS makes my left eye twitch uncontrollably).

  • These guidelines are by no means authoritative or exhaustive, but I feel they are a good starting point for organising and standardising React components and some of the more common use cases I encounter.
  • Hopefully these guidelines provide a useful starting point for organising your React components.

An opinionated set of React.js best practices to make components more readable, more robust and easily maintainable.
Continue reading “React.js best practices and conventions”

Jay Phelps on RxJS with React, Ari Lerner on Cross-Platform Apps w/ React Native

  • Food & Drinks provided by Nerdwallet
  • Jay Phelps on RxJS with React, Ari Lerner on Cross-Platform Apps w/ React Native
  • Jay Phelps (@_jayphelps ) talks about why Netflix loves reactive programming with Rx.
  • Jay writes JavaScript at Netflix.
  • Ari Lerner: Powering React Native apps with your own custom, cross-platform library

Food & Drinks provided by Nerdwallet
Agenda:
6:00 – 6:45: Food & drinks
6:45 – 8:30: Talks & Community Announcements
8:30 – 10:00: Social hour

Talk 1
Ari Lerner: Powering React Native app
Continue reading “Jay Phelps on RxJS with React, Ari Lerner on Cross-Platform Apps w/ React Native”

Using Saga To Accumulate And Deduplicate Redux Actions

  • GET /users/789 GET /users/456 GET /users/735 …
  • keys ( ids [ resource ]) }, }); delete ids [ resource ]; delete tasks [ resource ]; } function * accumulate ({ payload }) { const { id , resource } = payload ; if ( !
  • GET /posts HTTP 1.1 OK [ { id: 93, title: ‘seatae soluta recusante’, author_id: 789, }, { id: 124, title: ‘commodi ulam sint et’, author_id: 456 }, { id: 125, title: ‘consequatur id enim sint’, author_id: 735 }, …
  • The accumulate() function adds the id from the payload to an ids object that’s in the middleware closure, with a trick to deduplicate ids.
  • Redux Saga allowed us to keep the component logic simple (each component dispatches one single action), and to add sophisticated side effects in the controller part of the application.


Published on 18 October 2016

by François Zaninotto

with tags ReactJS admin-on-rest Redux

Continue reading “Using Saga To Accumulate And Deduplicate Redux Actions”

Flow as replacement for PropType

  • Component { static propTypes = { user: React.
  • props: $Exact< {user: User, width: number, height: number}> | $Exact< {user: User, variant: 'big' | 'medium' | 'small'}>; Radoslav Stankov © 2016 Proudly published with Ghost
  • User is a generic type (can be used for any javascript function)
  • The type is incompatible with void ^^^^^^^ number.
  • It is possible to pass all three props – width , height , variant

A couple of months ago at Product Hunt, we decided to switch from React.PropTypes to Flow. Initially, we started using Flow just for function definitions. Then we start replacing propType.
Continue reading “Flow as replacement for PropType”