sharusdiary.hashnode.devReact Responding to events - Blog 5I created a functional component in React named RespondingToEvents. This component renders a button with the label “Click me!” and defines a handleClick function that displays an alert when the button is clicked. Then I created a function for a simpl...Nov 29, 2023·2 min read
sharusdiary.hashnode.devReact Rendering lists - Blog 4Initially, I created an array named “products”, where each element is an object representing a technology or skill. Each object has properties such as “title” (representing the name of the technology), “isLanguage” (boolean indicator to recognise if ...Nov 28, 2023·2 min read
sharusdiary.hashnode.devReact Displaying data - Blog 3JSX allows developers to put markup into JavaScript. Through curly braces can "escape back" into JavaScript. Thus, I can embed the required variable from my code and display it to the user. For instance below code will display the "user name". return...Nov 25, 2023·2 min read
sharusdiary.hashnode.devReact Adding styles - Blog 2In React, can specify a CSS class with className. Utilizing CSS is the same as the HTML class attribute. First need to import the CSS class into your .js file. Below is the Home.js file: import React from 'react' import "./home.css" export default f...Nov 24, 2023·1 min read
sharusdiary.hashnode.devReact Creating and Nesting components - Blog 1React apps are based on components. A component can be identified as a piece of UI (User Interface) with its unique logic and appearance. Based on the purpose, the size of the Component can be different from one to another. A component can be built o...Nov 23, 2023·1 min read