×

React Js

The World's best Software Development Study Portal

ReactJS JSX

JSX stands for JavaScript XML. With the help of JSX we can write HTML in React.

JSX is the extension of javascript. We can use it with React for UI design

1. It performs optimization while compiling code to JavaScript make it faster.

2. Its caught error while writing the code make it type-safe language.

JSX is more similar to html. This how we can use our jsx in App.js

import React from 'react'; class App extends React.Component { render() { return ( <div> Welcome to React JS Website! </div> ); } } export default App;

Output: Welcome to React JS Website!

ReactJS Styling . This how we can use styling in App.js

import React from 'react'; class App extends React.Component { render() { var myStyle = { fontSize: 100, color: '#FF0000' } return ( <div> <h1 style = {myStyle}>Header </h1> </div> ); } } export default App;

Output: Header