Allow only numeric values or digits in input field using React

Introduction In this example I am going to show you how to allow only numeric values or digits in input field using React JS. You may have a requirement where you only need to allow user digits or numeric values for the input field. If user inputs non-numeric values then either you show an error or you do not allow non-numeric values at all. Here I am going to show you how to show error when user type non-numeric values in the input field. In another example I am also…

Continue

Autocomplete input using React

Introduction I am going to show you how to show auto complete suggestion when users search for something by typing in the input field. Autocomplete allows users to have other suggested strings or values displayed on typing of the relevant text in the input field. You have also seen when you start a search on Google or other search engines, you can find the information you are looking for using search predictions.

Continue

How to consume GraphQL CRUD API using React and Apollo

Introduction In this tutorial we are going to show you how to consume GraphQL CRUD API using React and Apollo. CRUD means Create, Read, Update and Delete operations. Therefore we are going to create client application for GraphQL server. I am going to use Spring Boot framework for implementing GraphQL server. In the server side implementation we are performing CRUD operations on category and product using GraphQL and Spring Boot. Here in client side implementation using React, I will only show you how to perform CRUD operations of category and…

Continue

Delete Multiple Table Rows from Server using React

Introduction In this tutorial we are going to show how to delete multiple table rows from server using React JS. Let’s say we have product data which got displayed on HTML table on user interface (UI). And users want to either select individual row or multiple rows for deletion from the HTML table. Therefore we will put individual checkbox against each row on the table for multiple rows selection. Once user selects the rows, he/she may click on a button to delete the selected products. We determine the each row’s…

Continue

Cascading or dependent dropdown using React JS

Introduction In this post we will see an example on cascading or dependent dropdown using React JS. When you have a requirement for selecting dropdown values based on another dropdown values then you need to create such cascading or dependent dropdown. For example, in your application you need to select city based on state or country then you need to create such dependent dropdown. Here we will create some dummy dataset for country, state and city and we will show in the dropdown with select/option tags.

Continue

Upload file to server using React

Introduction In this post we will see how to upload file to server using React JS framework. In server side you can use any server side technology for implementing REST API that will store file into a physical path or persistence storage. Here we will only focus on client side technology React framework only. user will be provided a browse button to select a file and a button for uploading file into server. The button will be disabled by default until a user selects a file for uploading. You may…

Continue

Upload file using React and Spring Boot

Introduction In this tutorial we will see how to upload file using React and Spring Boot technologies. React or React JS will be used as a client side or front end technology and Spring Boot will be used as a server side technology for uploading file. We will upload file to server using Spring REST API. As a server side technology we will use Spring Boot 2.1.6 and in client side we will use React JS. You may also like to read Download file using React and Spring Boot. Prerequisites Eclipse…

Continue

Download file from server using React

Introduction Here we will see how to download file from server using React JS framework. You can use any server side technology to download file but we will focus on client side technology React JS framework. You may read more on react here at https://reactjs.org/. We will provide link as well as button on which user will click and download file from server. User will get Save As option when clicks on download link or button. You may also like to read How to download file from server using Angular.

Continue

Download file using React and Spring Boot

Introduction In this post you will see how to download file using React and Spring Boot. There are situations where you need to download file from server or you need to generate report from database and download it. This example may help you in that situation. Here I will fetch records from database and download in a JSON format. As a server side technology I will use Spring Boot and in client side I will use React JS.

Continue

Spring Boot + ReactJS CRUD Example

Introduction Here you will see tutorial on Spring Boot + ReactJS Example. We have seen many examples of Spring MVC web application application using JSP as a front-end technology but here we will use ReactJS as a front-end technology to represent our UI. We have also seen how to Create CRUD Web App using Spring + AngularJS. You can also find my other tutorials on ReactJS. We basically create two projects – one is frontend or client side called web-app and another one is backend called java-app. Obviously as the…

Continue