First encounter with React JS

This is a small demo made using React and Boostrap. It’s a list page which contains some of the Avengers, with the possibility to reach a show page with details for each character.

The purpose of the demo was to get an opinion on this JavaScript library for user interfaces, since I’m not a big fan of frontend development.

The conclusion:

  • Suitable for simple interfaces;
  • Easy to learn;
  • Possibility  to port the web application to a native iOS or Android application with minimum of effort, using React Native.

The demo: http://cristian-radulescu.ro/github-demos/react_demo-avengers/index.html.

The code: https://github.com/cristianradulescu/react_demo-avengers.

Screenshots:

react_demo_avengers_list_page react_demo_avengers_show_page

Remove spaces from an input field with JavaScript

This is a small snippet to remove the spaces from an input field using JavaScript. It can be useful when you want a value without spaces, or when you want to replace the spaces from the input field with other characters.

The JavaScript code:

The input field:

The spaces will be stripped from the input field in real-time, as the user types.