Why I Switched To Sketch For UI Design (And Never Looked Back)

Original Source: https://www.smashingmagazine.com/2017/09/ideal-sketch-setup-ui-design/


 

 

User interface design has changed dramatically in the last few years, as traditional computers have ceded dominance to smaller screens, including tablets, mobile phones, smartwatches and more.

My Ideal Sketch Setup For UI Design

As the craft has evolved, so has its toolset; and from one app to rule them all — looking at you, Photoshop! — we have gotten to a point where it seems like a new contender among UI design tools crops up every month. And I have to admit that many of the new UI design tools look pretty good and promising.

The post Why I Switched To Sketch For UI Design (And Never Looked Back) appeared first on Smashing Magazine.

Rellax.js – Free Parallax Features Using Vanilla JavaScript

Original Source: http://www.hongkiat.com/blog/rellaxjs-parallax-script/

Parallax scrolling looks incredible when done right. It’s not a feature you’ll want on every website but for creative sites and landing pages, parallax elements grab attention fast. There…

Visit hongkiat.com for full content.

Collective #348

Original Source: http://feedproxy.google.com/~r/tympanus/~3/FeX_XRelD_c/

C348_FullStory

This content is sponsored via Syndicate Ads
See What Your Users See With FullStory

FullStory helps you build incredible online experiences by capturing every click, swipe, and scroll, then replaying sessions with pixel-perfect clarity.?

Try FullStory, free

C348_PWA

A React And Preact Progressive Web App Performance Case Study: Treebo

A very interesting performance case study on Treebo, India’s top rated budget hotel chain. By Addy Osmani and Lakshya Ranganath.

Read it

C348_gridfallback

Basic grid layout with fallbacks using feature queries

An in-depth look into the thought process and code for building a grid layout with graceful fallbacks powered by feature queries. By Chen Hui Jing.

Read it

C348_Powerplug

React PowerPlug

React PowerPlug creates a state and passes down the logic to its children giving life to dumb components. By Renato Ribeiro.

Check it out

C348_ConfRadar

Conference Radar

A great place to find upcoming conferences.

Check it out

C348_roundups

Roundups

A curated collection of newsletters and roundups for designers.

Check it out

C348_BikeToSchool

Bike to School

A great demo by Mariusz Dabrowski with a detailed explanation of how it was done in this article.

Check it out

C348_CssinJS

CSS in JS is like replacing a broken screwdriver with your favorite hammer

An interesting read on the CSS in JS problematic by Kevin Ball.

Read it

C348_Runtime

Runtime Type Information

Collect runtime type information of your JavaScript code with V8’s new type information feature.

Check it out

C348_butterfly

Butterfly

Some beautifully flapping butterflies by Yoichi Kobayashi.

Check it out

C348_criticalpath

Critical Path CSS Generator

Internal CSS Style Sheet Generator for the above the fold content.

Check it out

C348_MemoryJS

How JavaScript works: memory management + how to handle 4 common memory leaks

Alexander Zlatkov discusses the critical topic of memory management in JavaScript.

Read it

C348_Modulator

Modulator

A spacing tool for design systems made by Hayk An.

Check it out

C348_Peomy

Free Font: Peomy

A lovely, handwritten brush font made by Ieva and Krisjanis Mezulis.

Get it

C348_spacingsystem

A framework for creating a predictable & harmonious spacing system for faster design-dev handoff

Priyanka Godbole wrote this excellent article about a great framework concept a while back.

Read it

C348_Halloween

HaWe: Halloween Vector Toolkit

Need some high-quality, super geeky Halloween vectors? Creative Veila has got you covered.

Get it

C348_search

What every software engineer should know about search

A great guide on how to build or improve a search experience. By Max Grigorev.

Read it

C348_classwrap

Classwrap

Classwrap is a tiny JavaScript function for conditionally concatenating class names.

Check it out

C348_Font

Free Font: Mouron

A free typeface designed by Simon Dunford.

Get it

C348_promiseProgress

p-progress

Create a promise that reports progress to the user, useful during long-running async operations.

Check it out

C348_Monads

JavaScript Monads Made Simple

Learn all about JavaScript monads in this new part of the “Composing Software” article series by Eric Elliott.

Read it

C348_ruby

Learning Ruby: From Zero to Hero

Learn the most important concepts of Ruby from scratch in this tutorial by Leandro T.k.

Read it

C348_png

src2png

Turn your source code into beautiful syntax-highlighted images. Great for presentations.

Check it out

C348_Briefbox4

Briefbox

The library of practice briefs and helpful resources for designers just got a major rehaul. Read more about the new version in this article.

Check it out

Collective #348 was written by Pedro Botelho and published on Codrops.

Ultimate UX Design Guide to SaaS On-Boarding, Part 1: Sign-Up Forms

Original Source: https://www.webdesignerdepot.com/2017/09/ultimate-ux-design-guide-to-saas-on-boarding-part-1-sign-up-forms/

SaaS Customer On-boarding is the process that users have to experience while initiating their journey as a customer on a company’s software application. Customer on-boarding initiates from the experience that employees previously had to undergo while joining a firm. The on-boarding process sets the tone for a good user experience.

Long story short, special emphasis should be given to make the on-boarding process as flawless as possible.

The SaaS customer on-boarding process is based on 6 comprehensive aspects:

Sign up Form
Welcome Email
Drip Campaign
First Login & Product Tutorial
Data Import & Notifications
Check up calls & Swag

All the aspects of the process play an equally important part in forming a desirable reputation of the brand in the eyes of the customers during the on-boarding process. I will be discussing the first step to the on-boarding process, the sign up forms, in detail today.

Sign up forms are the first point of contact between an application and a customer, which is why I will be discussing them before the rest. By providing tips which can improve the experience at the customer’s end, I will be providing start ups with 6 useful techniques to make the process smooth and convenient.

Keep the Questions Limited

If you ask the customers to fill a large amount of fields on the sign up form, there is bound to be some discontent at their end. You have to limit the questions you ask, to increase the rate of conversion from the sign up form to the other parts of the process. By decreasing the amount of questions you initially ask, you can ensure a higher conversion rate.

Having understood the importance of keeping the questions limited, it is imperative that you know which questions to cut out and which you should include. Anything that can directly initiate your relationship with the customer should be asked. An email address is good enough for a subscription, so it should be your priority.

Shopify’s sign up page is an example of keeping it precise and to-the-point.

Ask whatever is necessary to initiate your relationship and make the customer proceed to the next step. Necessary questions include the email address of a user, so that there is a mode of communication. Besides the email and user name, other questions regarding the personal information of the user should be left for later, in the ‘Complete Your Profile’ step. Let’s continue using Shopify’s example. Once a customer signs up with Shopify, they are directed towards completing their profile:

 

Back Your Sign Up Form with Strong Social Evidence

One noticeable thing about the current generation is their infatuation towards joining the bandwagon and keeping up with the fads. So, if you are able to put up interesting figures regarding the people who have signed up on your website with success, you can be guaranteed of a positive response from the customer.

Salesforce is an excellent example of a company that does this. Right below the signup form, a customer can find the benefits that customers of Salesforce have received.

 

SingleGrain decided to create their social proof by displaying on the sign-up page logos of their clients.

InVisionApp took and advantage of the authority principle displaying on the sign-up page testimonials from people like Mike Davidson (Vice President of Design at Twitter) or Andy Law (‎Manager of Mobile Product Design at Netflix)

 

Make the Email Sign-up a Beneficial Deal For the Customer

If you are able to sell the sign up to the customer, you have aced the first step of the SaaS customer on-boarding process. You need them to sign up on your website, and the customers need something for doing that. To be fair, the customers want as much as they can get, for giving as little information as they can. This is where a conundrum arises.

The confusion can be solved by creating a deal for the customer. Get the customer to perceive they’re benefiting from the deal. This can be done by offering the customer something in return, something which motivates the customer to move into the sign-up process. The value proposition should be clearly visible for the customer to comprehend. Many SaaS companies like Convertize.io come up with a brilliant motivation argument—the free trial period that often motivates individuals to sign up. Convertize gives your 14-days trial as an opportunity to test their product.

 

The offer you make to the customers plays the role of the main attraction and serves as bait. If the offer is viable and good enough for the customers, it will help in attracting them to the brand. If it is not, then customers won’t be attracted to your brand. Thus, the offer you make to the customers is your lead magnet or core attraction. All other details just complement the lead magnet into initiating the perfect deal with you.

Design is Important!

The design of the form is as important as anything else, which is why great detail should be given to this aspect of the deal. A design which is aesthetic is bound to get more customers sign up for your website than before. The importance of design should not be neglected at all costs. Furthermore, a website with a better design than the other websites will garner more trust from the users. Accordingly to Dr Coker, from the University of Melbourne’s Faculty of Business and Economics, users are found to trust website with prettier designs more than others:

Internet consumers are 20 per cent more trusting of websites than they were five years ago

Coinbase’s signup form is an excellent example. The design is simple and user friendly without compromising on looking sleek and elegant.

 

Manage User’s Expectations

Let customers know what’s going to happen next. Don’t leave them quizzical as suspense is not the feeling you want to create here. Make the customer trust you from the word go, by letting them know what they’re signing up for.

If consumers have to submit the form feeling uncertain about what is going to happen next, there is bound to be friction. The best way to go about this is to have your submit button say something other than just ‘submit’. You can write whatever is going to happen next on the button. This way there will be less uncertainty and the users will be more in control.

Leanplum’s signup page is a good example of this, with the promise of instant access after signup.

 

Social Media Signup

Giving users the option to sign up using social media accounts can drastically speed up the process for the user and increase the probability of conversion. Common social media sign-in options include Facebook, Twitter, Google Plus. Clicking on a social media button for access looks far more appealing to the user, as compared to filling in a number of information fields.

There are a number of advantages and disadvantages of using social media signups.

The advantages include:

No need to worry about an additional password. People with an active online presence are usually members of a lot of websites. Remembering an additional password can be worrisome and can deter a user enough to not sign up for your website. A social media sign-in option eliminates this deterrent.
Faster registration. Signing up via a social media account is far faster than the tedious process of filling out an online form
Market Research. A social account sign-in can grant you a wealth of information about your user, ranging from personal preferences to birthday, where they live, their friends etc. This can allow you to better assess your target market.
Engaged Users. According to online research, users that log in to other websites via Social media accounts stay longer. This research was conducted by Facebook. Users can Like / Share and since their friends are right there, this can increase the market reach for your website.

Disadvantages of using Social Media Sign up:

Anxiety from too many options. If you offer multiple social media sign-in options your user could become flustered and then decide to “come back to it later”.
Would it affect your brand? Giving a social media sign-in option is creating the presence of another brand alongside your own. Will the option really result in a greater conversion rate? Also, if a user’s social media account is hacked, their account on your website may suffer too.
Relying on a third party. If a social media server crashes, it could restrict your user’s access to his/her account with you. You would need a backup for that eventuality.
Accessibility. Some workplaces have blocked social media websites. Therefore, if your users log in through social media, they would not be able to.
Privacy. Some users are extremely privacy conscious and would rather create an account with you rather than use their social media.

Signup Flow

We’ve talked about how it’s important to have a signup page that is concise and enticing by way of its content and design. However, the signup page is part of something called the “sign-up flow”. The signup flow refers to the steps in the process that the user has to take to go from signing up to using the product / service. We encounter another term in this regard, which is “friction”. Simply put, friction represents the amount of effort that the user has to invest in completing the signup process.

Let’s talk a little bit about friction and then we’ll go on to discuss common signup flows that companies use.

Friction

The amount of friction encountered by users can’t really be objectively measured. However there are three things (according to Totango) that can, to an extent, allow for gauging how much friction an average user might encounter:

Information Cost. Total number of fields to be filled in by the user.
Steps to Completion. The number of steps / pages the user has to pass through to get to access the application.
Effort investment. Number of decisions that the user has to make and extra activities to be completed.

3 Common Signup Flows

Signup flows can be designed in innumerable ways. The flow is dependent on the product, the target market and many other variables. However there are three broad based signup flows that we’ve observed, and usually other signup flows are more or less derivative of these.

Flow 1: Access to App After a Number of Steps

This is the most commonly used sign up flow that companies use. Users are familiar with this process and consequently don’t have to think much about it. However there are a lot of steps that the user needs to take before getting to the app.

Flow 2: Setting Up of Account After Accessing the App

Being able to instantly access the app after signup is the reason why a lot of friction is eliminated in this approach. However this way you could get a lot of users who just want to try the app out, without any intention of completing the signup process.

Flow 3: Immediate Access to the App 

A signup flow that goes one step further than the second approach, this is absolutely frictionless.

Conclusion

<

p class=”p2″>Sign-up forms don’t come across as the most exciting items to design on a website. In fact, most companies neglect the importance of sign-up forms by implementing below par designs. You can either inculcate a striking palette, a witty heading or an aesthetic design. But whatever you do, make sure that your first impression weaves its magic over the customers. Keeping in mind the importance of the sign up page in setting the right impression, there should be no errors whatsoever.

5,000+ Pixel-Perfect Icons from Icon54 – only $24!

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

Stunning Examples of Interaction in Mobile App Design

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/c085adpBZ6Y/

Visual appeal aside, effective interaction design can lead to significant improvements in the user experience of your mobile product.

Taking the iOS or Android operating systems, you can see that almost every action is executed by some type of interaction. Whether this interaction comes in animation terms, or tangible feedback such as a taptic engine, the possibilities are never ending.

Example #1 – Siren

Siren uses many different interaction animations in its app design. The first of which are the elements that move with varying delays to produce something of a ‘wave’ effect when you swipe left or right.

Siren interaction animation

This provides additional feedback to the user as to the overall structure and flow of the main page. The app also utilizes shrinking elements to expand the interaction area of the interface, while ensuring critical information always remains on show.

Example #2 – B&O Play

The B&O Play app implements a series of satisfying transitional effects upon interaction with scrolling, color choice, and selection.

B and O Play

There are a number of effects for each interaction, including delayed horizontal motion, icon pops, and even visual feedback in the form of attaching imagery to the scroll area when a user has scrolled to the top of the list.

It uses these effects subtly, with precision and restraint, resulting in one of the finest examples around.

Example #3 – Bthere

Bthere’s app is a delightful example of interaction design in order to entice the user through the onboarding process – something that is typically a somewhat tedious part of the user experience

Bthere interaction design

By animating the icon transitions and background colors, as well as the individual icon elements themselves (including the scooter’s exhaust!), Bthere has conveyed the fun and light-heartedness of their brand effectively, while likely improving user conversion and retention upon download of the app.

Example #4 – Housing

Housing uses subtle interactions throughout their app. Upon adding a new feature, whereby the user could call an Uber to a viewing, the design team needed to find an unobtrusive way in which to bring attention to this new addition.

Housing app

The result, as shown above, is enough to grab the user’s attention momentarily, while not being in-the-face of the user. The execution of both icon design and color combines effectively to improve conversions as well as visual appeal.

Example #5 – Neighborhood

The final example, Neighborhood, implements interaction design in almost every aspect of the app, throughout icons, popover elements, messages, and panning.

Neighborhood app interaction design

The attention to detail in every step of the design has lead to some visually satisfying results, including a user menu that is somewhat reminiscent of Facebook’s chat heads.

Overall, it results in a cohesive user experience with plenty of visual feedback and easy-to-use features.

Finished

As 2017 gets underway, the abundance of tools now available to designs and developers, should see some even more spectacular and unique results in mobile app interaction design throughout this year.

Which interactions would you like to see more of in 2017? Share them below in the comments!


How to Learn React: Everything You Need to Get Started

Original Source: https://www.sitepoint.com/learn-react-everything-need-get-started/

React is a JavaScript library, originally built by developers at Facebook, for building fast user interfaces. If you’re dipping your toe into the React waters, or if your React development journey is picking up speed, it can be hard to stay across the fundamentals, techniques, tools and tricks – so we’ve created this guide to […]

Continue reading %How to Learn React: Everything You Need to Get Started%

Launching Your Design Career: Which Type Of Education Is Best For You?

Original Source: https://www.smashingmagazine.com/2017/09/design-career-best-education/


 

 

If you’re stuck in a job you hate and have dreams of becoming a designer and working in a creative role that fills you with excitement daily, the road to entering this completely new industry can feel daunting.

Launching Your Design Career: Which Type Of Education Is Best For You?

Making a major career shift late in life to follow your passion is scary. Not only is it sometimes difficult to know where to start to learn about an expansive field like design, but it can also feel risky, especially if you’re working a secure job.

The post Launching Your Design Career: Which Type Of Education Is Best For You? appeared first on Smashing Magazine.

Collective #341

Original Source: http://feedproxy.google.com/~r/tympanus/~3/MDXVf5wQ2Eg/

C341_PageCloud

Our Sponsor
You’ve Never Made A Website Like This Before

When you pick the right platform, creating isn’t a struggle! Change the way you make websites forever.

Try PageCloud today

C341_comparison

Designing The Perfect Feature Comparison Table

Vitaly Friedman continues an excellent series on UI patterns and dives into feature comparison tables.

Read it

C341_Speakerdex

Speakerdex

A place for speakers to share talks and for event organizers to find them.

Check it out

C341_async

Using ES2017 Async Functions

Eric Windmill explains asynchronous JavaScript and the new ES2017 feature async.

Read it

C341_Js13k

Js13kGames

Enter this year’s JavaScript coding competition and make something under 13kb. The competition started at 13:00 CEST, 13th August and will end at 13:00 CEST, 13th September 2017. Theme for 2017 is: lost.

Check it out

C341_Skeuo

Thoughts on Skeuomorphic Menu Systems

Charlie Deets explores skeuomorphic and spatial menu systems, highlighting advantages and disadvantages.

Read it

C341_WebFonts

Web fonts: when you need them, when you don’t

A great read by David Gilbertson on making an informed decision when it comes to using web fonts.

Read it

C341_Font

Free Font: Buddy Mac

A skinny all-caps font designed by Missy Meyer.

Get it

C341_styleguide

Creating a Collaborative Style Guide for Designers and Engineers

Learn how building a flexible, collaborative, and scalable typography guide helps designers and engineers collaborate better.

Read it

C341_Hologram

Hologram

A Mac app that lets you prototype WebVR interactively without prior coding knowledge.

Check it out

C341_InteractionDesign

Foundations of Interaction Design

Read about how Christina Wodtke teaches Interaction Design in this interesting article.

Read it

C341_Accessible

How to design websites for blind and partially sighted people

Learn how to improve accessibility for people with visual impairments. By Christopher Ratcliff.

Read it

C341_phpbot

Phpbot

A PHP snippet bot that generates code examples for quick copy/pasting.

Check it out

C341_blender

Blender

A Sketch app plugin that distributes shapes evenly between multiple objects in Sketch.

Check it out

C341_qlearning

Teaching an AI to play a simple game using Q-learning

Learn how to teach a computer to master a simple video game using the q-learning reinforcement learning algorithm.

Check it out

C341_Stockio

Stockio

A new site with free photos, vectors, icons, fonts and videos for personal and commercial use.

Check it out

C341_fintech

A free set of 48 free fintech vector icons

A great line icon set designed by Agente Studio.

Get it

C341_prettyalgo

Pretty algorithms

Common useful algorithms written in modern, pretty and easy-to-understand JavaScript along with real-world usage examples.

Check it out

C341_pa11y

Accessibility Testing with pa11y

In this article by Ire Aderinokun you’ll learn how to use pa11y, a set of free and open source tools that aims to make designing and developing accessibility easier.

Read it

C341_picostyle

Picostyle

An ultra small CSS in JS library by Masaaki Morishita.

Check it out

C341_FontArcanista

Free Font: Arcanista

Victor Tramontin designed this creative display font.

Get it

C341_SketchDesigners

Sketch for Designers

A growing collection of the best Sketch resources.

Check it out

Collective #341 was written by Pedro Botelho and published on Codrops.

Getting Started with React: A Beginner’s Guide

Original Source: https://www.sitepoint.com/getting-started-react-beginners-guide/

In this guide, I’ll show you the fundamental concepts of React by taking you through a practical, step-by-step tutorial on how to create a simple Message App using React. I’ll assume you have no previous knowledge of React. However, you’ll need at least to be familiar with modern JavaScript and NodeJS.

React is a remarkable JavaScript library that’s taken the development community by storm. In a nutshell, it’s made it easier for developers to build interactive user interfaces for web, mobile and desktop platforms. One of its best features is its freedom from the problematic bugs inherent in MVC frameworks, where inconsistent views is a recurring problem for big projects. Today, thousands of companies worldwide are using React, including big names such as Netflix and AirBnB. React has become immensely popular, such that a number of apps have been ported to React — including WhatsApp, Instagram and Dropbox.

Prerequisites

As mentioned, you need some experience in the following areas:

functional JavaScript
object-oriented JavaScript
ES6 JavaScript Syntax

On your machine, you’ll need:

a NodeJS environment
a Yarn setup (optional)

If you’d like to take a look first at the completed project that’s been used in this guide, you can access it via GitHub.

[affiliate-section title=”Recommended Courses”][affiliate-card title=”The Best Way to Learn React for Beginners” affiliatename=”Wes Bos” text=”A step-by-step training course to get you building real world React.js + Firebase apps and website components in a couple of afternoons. Use coupon code ‘SITEPOINT’ at checkout to get 25% off.” url=”https://ReactForBeginners.com/friend/SITEPOINT” imageurl=”https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2017/07/1501203893wesbos.jpg”][/affiliate-section]

What is React?

React is a JavaScript library for building UI components. Unlike more complete frameworks such as Angular or Vue, React deals only with the view layer. Hence, you’ll need additional libraries to handle things such as data flow, routing, authentication etc. In this guide, we’ll focus on what React can do.

Building a React project involves creating one or more React components that can interact with each other. A React component is simply a JavaScript class that requires the render function to be declared. The render function simply outputs HTML code, which is implemented using either JSX or JavaScript code. A React component may also require additional functions for handling data, actions and lifecyle events.

React components can further be categorized into containers/stateful components and stateless components. A stateless component’s work is simply to display data that it receives from its parent React component. It can also receive events and inputs, which it passes up to its parent to handle. A React container or stateful component does the work of rendering one or more child components. It fetches data from external sources and feeds it to its child components. It also receives inputs and events from them in order to initiate actions.

Understanding the React DOM

Before we get to coding, you need to be aware that React uses a Virtual DOM to handle page rendering. If you’re familiar with jQuery, you know that it can directly manipulate a web page via the HTML DOM. In a lot of use cases, this direct interaction poses little to no problems. However, for certain cases, such as the running of a highly interactive, real-time web application, performance often takes a huge hit.

To counter this, the concept of the Virtual DOM was invented, and is currently being applied by many modern UI frameworks including React. Unlike the HTML DOM, the Virtual DOM is much easier to manipulate, and is capable of handling numerous operations in milliseconds without affecting page performance. React periodically compares the Virtual DOM and the HTML DOM. It then computes a diff, which it applies to the HTML DOM to make it match the Virtual DOM. This way, React does its best to ensure your application is rendered at a consistent 60 frames per second, meaning that users experience little or no lag.

Enough chitchat! Let’s get our hands dirty …

Start a Blank React Project

As per the prerequisites, I assume you already have a NodeJS environment setup. Let’s first install or update npm to the latest version.

$ npm i -g npm

Next, we’re going to install a tool, Create React App, that will allow us to create our first React project:

$ npm i -g create-react-app

Navigate to your project’s root directory and create a new React project using the tool we just installed:

$ create-react-app message-app


Success! Created message-app at /home/mike/Projects/github/message-app
Inside that directory, you can run several commands:

yarn start
Starts the development server.

yarn build
Bundles the app into static files for production.

yarn test
Starts the test runner.

yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

cd message-app
yarn start

Happy hacking!

Depending on the speed of your internet connection, this might take a while to complete if this is your first time running the create-react-app command. A bunch of packages gets installed along the way, which are needed to set up a convenient development environment — including a web server, compiler and testing tools.

Navigate to the newly created message-app folder and open the package.json file.

{
“name”: “message-app”,
“version”: “0.1.0”,
“private”: true,
“dependencies”: {
“react”: “^15.6.1”,
“react-dom”: “^15.6.1”,
“react-scripts”: “1.0.12”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test –env=jsdom”,
“eject”: “react-scripts eject”
}
}

Surprise! You expected to see a list of all those packages listed as dependencies, didn’t you? Create React App is an amazing tool that works behind the scenes. It creates a clear separation between your actual code and the development environment. You don’t need to manually install Webpack to configure your project. Create React App has already done it for you, using the most common options.

Let’s do a quick test run to ensure our new project has no errors:

$ yarn start

Starting development server…
Compiled successfully!

You can now view message-app in the browser.

Local: http://localhost:3000/
On Your Network: http://10.0.2.15:3000/

Note that the development build is not optimized.
To create a production build, use yarn build.

If you don’t have Yarn, just substitute with npm like this: npm start. For the rest of the article, use npm in place of yarn if you haven’t installed it.

Your default browser should launch automatically, and you should get a screen like this:

Create React App

One thing to note is that Create React App supports hot reloading. This means any changes we make on the code will cause the browser to automatically refresh. For now, let’s first stop the development server by pressing Ctrl + C. This step isn’t necessary, I’m just showing you how to kill the development server. Once the server has stopped, delete everything in the src folder. We’ll create all the code from scratch so that you can understand everything inside the src folder.

Introducing JSX Syntax

Inside the src folder, create an index.js file and place the following code in it:

import React from ‘react’;
import ReactDOM from ‘react-dom’;

ReactDOM.render(&lt;h1&gt;Hello World&lt;/h1&gt;, document.getElementById(‘root’));

Start the development server again using yarn start or npm start. Your browser should display the following content:

Hello React

This is the most basic “Hello World” React example. The index.js file is the root of your project where React components will be rendered. Let me explain how the code works:

Line 1: React package is imported to handle JSX processing
Line 2: ReactDOM package is imported to render React components.
Line 4: Call to render function

<h1>Hello World</h1>: a JSX element
document.getElementById(‘root’): HTML container

The HTML container is located in public/index.html file. On line 28, you should see <div id=”root”></div>. This is known as the root DOM because everything inside it will be managed by the React DOM.

JSX (JavaScript XML) is a syntax expression that allows JavaScript to use tags such as <div>, <h1>, <p>, <form>, and <a>. It does look a lot like HTML, but there are some key differences. For example, you can’t use a class attribute, since it’s a JavaScript keyword. Instead, className is used in its place. Also, events such as onclick are spelled onClick in JSX. Let’s now modify our Hello World code:

const element = &lt;div&gt;Hello World&lt;/div&gt;;

ReactDOM.render(element, document.getElementById(‘root’));

I’ve moved out the JSX code into a variable named element. I’ve also replaced the h1 tags with div. For JSX to work, you need to wrap your elements inside a single parent tag. This is necessary for JSX to work. Take a look at the following example:

const element = &lt;span&gt;Hello,&lt;/span&gt; &lt;span&gt;Jane&lt;/span;

The above code won’t work. You’ll get a syntax error telling you must enclose adjacent JSX elements in an enclosing tag. Basically, this is how you should enclose your elements:

const element = &lt;div&gt;
&lt;span&gt;Hello, &lt;/span&gt;
&lt;span&gt;Jane&lt;/span&gt;
&lt;/div&gt;;

How about evaluating JavaScript expressions in JSX? Simple, just use curly braces like this:

const name = “Jane”;
const element = &lt;p&gt;Hello, {name}&lt;/p&gt;

… or like this:

const user = {
firstName: “Jane”,
lastName: “Doe”
}
const element = &lt;p&gt;Hello, {user.firstName} {user.lastName}&lt;/p&gt;

Update your code and confirm that the browser is displaying “Hello, Jane Doe”. Try out other examples such as { 5 + 2 }. Now that you’ve got the basics of working with JSX, let’s go ahead and create a React component.

Continue reading %Getting Started with React: A Beginner’s Guide%

Collective #347

Original Source: http://feedproxy.google.com/~r/tympanus/~3/ZvSnbLi0s28/

C347_WOTW

Inspirational Website of the Week: Heartbeat Agency

Bold typography, interesting layouts and organic shapes make this design our inspiration of the week.

Get inspired

C347_NewSchool

Advertisement
New Master’s in Communication Design at Parsons

Parsons School of Design in NYC has launched a 1-year Master’s for design professionals focusing on digital product design.

Learn more

C347_chromedevtools

Learn How To Debug JavaScript with Chrome DevTools

Brandon Morelli shows how to ditch console.log debugging once and for all and learn how to use breakpoints to debug code within the Chrome Developer Tools.

Read it

C347_justwritecss

The zen of Just Writing CSS

An article by Rich Harris where he lays out how the biggest problems with CSS can be solved without CSS-in-JS.

Read it

C347_xrespond

Meet XRespond Testing Tool: Let’s Make Building Responsive Websites Simpler

Indrek Paas introduces XRespond, a virtual device lab for designing, developing and testing responsive websites.

Read it

C347_Lozad

Lozad

A performant JavaScript lazy loader with no dependencies for images, iframes and more. By Apoorv Saxena.

Check it out

C347_jstutorials

Every JavaScript framework tutorial written more than 5 minutes ago

The sad story of every developer trying to learn a JavaScript framework. A witty article by Roger Collier’s.

Read it

C347_innerself

Innerself

A tiny view and state management solution using innerHTML.

Check it out

C347_screenreader

Screen Readers and CSS: Are We Going Out of Style (and into Content)?

Some excellent research on the behavior of different browser-screen reader combinations when it come to CSS rendering.

Read it

C347_Lovr

LÖVR

A cross-platform, open source framework for creating VR with Lua.

Check it out

C347_rastersvg

Lazy async SVG rasterisation

Jake Archibald shows a great way to rasterize SVGs lazily with the help of createImageBitmap.

Read it

C347_font

Free Font: Pool Riders

A fun typeface coming in three weights designed by Guerillacraft.

Get it

C347_slider

Cities Slider (React)

A beautiful slideshow demo made by Nikolay Talanov.

Check it out

C347_extension

I wanted real time GitHub push notifications. So I built a Chrome extension.

Stacy Goh implemented an interesting extension for receiving real time GitHub push notifications.

Read it

C347_pwa

Building a Small PWA with Preact and Firebase

Dan Denney shares his process of learning how to build a Progressive Web App.

Read it

C347_bootstrap

Wired Dots

A resource for free Bootstrap 4 themes and components.

Check it out

C347_impossibleshape

Interlocked blocks

One of Louis Hoebregts’ impossible shape demos.

Check it out

C347_jsframework

Angular vs. React vs. Vue: A 2017 comparison

Jens Neuhaus’ objective and informative comparison of the most popular JavaScript frameworks.

Read it

C347_oxipng

Oxipng

Oxipng is a multi-threaded lossless PNG compression optimizer written in Rust. It can be used via a command-line interface or as a library in other Rust programs. Made by Josh Holmer.

Check it out

C347_Websiteabout

For the love of God, please tell me what your company does

Kasper Kubica’s criticism on the current state of non-explanatory landing page jargon.

Read it

C347_Lego

Responsive LEGO

Responsive animated LEGO pieces by Chris Gannon.

Check it out

C347_stateoftheweb

The State of the Web

In case you missed it: A guide to impactful performance improvements by Karolina Szczur.

Read it

C347_scroll

react-awesome-scroll

An easy to customize styled scrollbar with native behavior.

Check it out

Collective #347 was written by Pedro Botelho and published on Codrops.