
- 298 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
JavaScript by Example
About this book
A project based guide to help you get started with web development by building real-world and modern web applicationsAbout This Book• Learn JavaScript from scratch by building clones of popular web applications• Understand the core concepts and techniques surrounding JavaScript with this power-packed hands-on guide• Explore modern JavaScript frameworks and libraries such as Node, React and Webpack Who This Book Is ForThe target audience for this book is developers with little or basic knowledge of working with JavaScript. If you are an emerging web developer with experience in building static web pages using HTML and CSS, this book will teach you to add JavaScript elements to make your website interactive and dynamic.What You Will Learn• A strong understanding of web application development with JavaScript and ES6.• A firm foundation on which to master other JavaScript frameworks and libraries.• Write maintainable and scalable code by organizing functions into modules.• Importance of tools such as Node, NPM, Babel, and Webpack in Front-end development.• Work with real-time data such as incoming video streams, texts, and so on• Integrate React with JavaScript to build large-scale applications.• Utilize Redux to manage data across React components and greatly speed up the development processIn DetailJavaScript is the programming language that all web developers need to learn. The first item on our JavaScript to-do list is building g a To-do list app, which you'll have done by the end of the first chapter. You'll explore DOM manipulation with JavaScript and work with event listeners. You'll work with images and text to build a Meme creator. You will also learn about ES (ECMAScript) classes, and will be introduced to layouts using the CSS3 Flexbox.You'll also develop a responsive Event Registration form that allows users to register for your upcoming event and use charts and graphics to display registration data. You will then build a weather application, which will show you different ways perform AJAX requests and work with dynamic, external data. WebRTC enables real-time communication in a web browser; you'll learn how to use it when you build a real-time video-call and chat application later in the book.Towards the end of the book, you will meet React, Facebook's JavaScript library for building user interfaces. You'll throw together a blog with React, and get a feel for why this kind of JavaScript framework is used to build large-scale applications. To make your blog more maintainable and scalable, you'll use Redux to manage data across React components.Style and approachThis project-based guide will teach you all the facets of JavaScript through real-world app examples.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Building a Blog with React
- You first built a simple ToDo list app using the JavaScript's ES6 syntax and then created a build script to compile it down to ES5 so that it will be compatible with older browsers.
- Then, you built a Meme Creator while setting up your own automated development environment, learning lots of new concepts and tools along the way.
- Next, you used the development environment and built an Event Registration app in which you built your first reusable JavaScript module for API calls and form validation.
- Then, you utilized the power of JavaScript WebAPIs to build a peer-to-peer video calling app with WebRTC.
- Lastly, you built your own HTML5 custom element that will display a weather widget and can be easily imported and used with other projects.
Why use a framework?
Selecting a framework
React
<h1 class="hello">Hello World!</h1>
const hello = (name) => React.createElement("h1", { className: "hello"}, "Hello ", name, "!") <h1 class="hello">Hello Rahul!</h1>
const hello = (name) => <h1 className="hello">Hello {name}!</h1> - The attributes of JSX elements cannot contain JavaScript keywords. See that the class attribute is replaced with className because a class is a reserved keyword in JavaScript. Similarly, for attribute, it becomes htmlFor.
- To include variables or expressions inside JSX, you should wrap them inside curly braces {}. It is similar to ${} we use in template strings.
- JSX requires the Babel React preset to get compiled to JavaScript.
- All the HTML elements in JSX should only use small case letters.
- For example: <p></p>, <div></div>, and <a></a>.
- Having capital letters for HTML is invalid.
- For example: <Div></Div> and <Input></Input> are all invalid.
- The custom components we created should start with capital letters.
- For example: consider the hello function that we created before, which is a stateless React component. To include it in JSX, you should name it as Hello and include it as <Hello></Hello>.
Table of contents
- Title Page
- Copyright
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Dedication
- Preface
- Building a ToDo List
- Building a Meme Creator
- Event Registration App
- Real-Time Video Call App with WebRTC
- Developing a Weather Widget
- Building a Blog with React
- Redux
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app