Book Image

Hands-On Full Stack Development with Spring Boot 2.0 and React

By : Juha Hinkula
Book Image

Hands-On Full Stack Development with Spring Boot 2.0 and React

By: Juha Hinkula

Overview of this book

Apart from knowing how to write frontend and backend code, a full-stack engineer has to tackle all the problems that are encountered in the application development life cycle, starting from a simple idea to UI design, the technical design, and all the way to implementing, testing, production, deployment, and monitoring. This book covers the full set of technologies that you need to know to become a full-stack web developer with Spring Boot for the backend and React for the frontend. This comprehensive guide demonstrates how to build a modern full-stack application in practice. This book will teach you how to build RESTful API endpoints and work with the data access Layer of Spring, using Hibernate as the ORM. As we move ahead, you will be introduced to the other components of Spring, such as Spring Security, which will teach you how to secure the backend. Then, we will move on to the frontend, where you will be introduced to React, a modern JavaScript library for building fast and reliable user interfaces, and its app development environment and components. You will also create a Docker container for your application. Finally, the book will lay out the best practices that underpin professional full-stack web development.
Table of Contents (24 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
Index

Chapter 6


Answer 1: The components are the basic building blocks of the React apps. The React component can be created using a JavaScript function or ES6 class.

Answer 2: The props and state are the input data for rendering the component. They are JavaScript objects and the component is re-rendered when the props or the state are changing.

Answer 3: The data flow is going from the parent component to child.

Answer 4: The components that have only props are called stateless components. The components that have both the props and the state are called stateful components.

Answer 5: JSX is the syntax extension for JavaScript and it is recommended to use with React.

Answer 6: The component life cycle methods are executed at the certain phases of the component's life cycle.

Answer 7: It is similar to handling DOM element events. The difference in React is that event naming uses camelCase naming convention for example, onClick or onSubmit .

Answer 8: The common case is that we want to invoke a JavaScript function that has access to form data after the form submission. Therefore we have to disable default behavior using preventDefault() function. You can use input field's onChange event handler to save the values from a input fields to the state.