Build a Portfolio Single Page Application Using React JS
Get link
Facebook
X
Pinterest
Email
Other Apps
If you are a newbie and struggling to get commenced with React JS, Read my preceding article on How I found out React JS as a noob — Ultimate React JS Starter Guide.
Please ensure you're carried out with the conditions of React JS which I’ve mentioned in my preceding article.
Ok, so in this big article, you’ll analyze React JS using Building a complete Portfolio Website as a Single Page Application (SPA).
This is a “Do It Along” kind of article. You’ll virtually have an amazing result if you construct along.
Here is the mission GitHub repository, you could clone or download the complete undertaking.
Things you’ll soak in:
Creating and implementing custom Components.
Working with external additives.
Working with Props.
Working with States.
Dynamic Rendering.
React Routing.
And Using CSS in React JS.
Let’s understand some concepts…
What is a “ Component “ in React JS?
React follows Component architecture, which means that every part of an internet app or website is part, all are made one by one and finally equipped into a parent component that's then rendered.
As within the photograph sidebar, header, chart all are separate additives fixed into one single parent issue.
A Component is a Javascript File, for example, you want to create a sidebar component then you need to create a “Sidebar.Js” file.
A factor may be of two types:-
Sub-Component
A sub-factor is a part that is living inside of another component.
Parent Component
A Parent aspect is a component in which sub-additives is living in.
How does a “Component” appear like in code?
The below code snippet is the boilerplate code for any issue. To create an element just replica this code and replace “YourComponentName” to something call you to need for the component.
“ YourComponentName.Js ”
Now let’s get started with Building the portfolio website the usage of React JS
If “Node JS” isn't always installed, Download Node JS and set up it.
I use Visual Studio Code for most of my React JS project and I highly advocate you to use.
import React, { Component } from 'react'class YourComponentName extends Component {render() {return (<div>{/* Your Html/JSX code goes here */}<h1>This is my component</h1></div>)}}export default YourComponentName
All the components have a parent component, it might be either “App.js” or some other component.
import React, { Component } from 'react';
That’s a common line of code you’ll see in almost all the components everywhere. In that, we are importing React and Component class from the ‘react’ module. Which enables us to create custom components.
class YourComponentName extends Component {
This is a class component, replace “YourComponentName” to whatever name you want.
render() {return (<div><h1>This is my component</h1></div>)
The render() method along with the return() method renders the content into the DOM.
and for now “YourComponentName.js” component will return “This is my component”.
Note: A component must return only one Node meaning a single <div> and everything inside it </div> , or a single tag (element).
export default YourComponentName
the above line of code is very important, make sure you add it compulsory, “export” keyword defines what are all the methods(functions) should be accessible to the component importing this component.
Now let’s get started with Building the portfolio website using React JS
If “Node JS” is not installed, Download Node JS and install it.
I use Visual Studio Code for most of my React JS project and I highly recommend you to use.
Now, create a new folder, name it whatever you want.
Open vs code.
Press ctrl-shift-n (cmd-shift-n) to open a new vscode window.
within the new window, click on the “Open Folder” blue button on the Explorer pane,
Browse and pick out the folder you created.
Go to View → Terminal to open a terminal internal vscode.
After that, create a React JS undertaking the usage of “create-react-app” CLI, now name the project whatever you need for now I’ll call it as “Portfolio_Website_ReactJS”.
$ npx create-react-app Portfolio_Website_ReactJS
after you get the message “Happy Hacking”, move inside the project directory
$ cd Portolio_Website_ReactJS
Folder structure for this project!
Initial folder structure
Inside the “src” folder, create three new folders and name them “components”, “contents”, and “img” respectively.
Inside the “Components” folder
Create the below components as javascript files in the “ components ” folder.
Navbar.jsThis component is the sidebar and will hold a set of “NavItems” components(Home, About, Education, Skills, Contact). It’s just a pink and blue gradient box.
NavItem.jsThis component will be the navigation items (e.g. Home, About, Education,…).
Social.js This component holds the Social media icon with links.
Social component preview
Widecard.jsThis component will hold the Education Details (as shown in the final result GIF above).
The Big Data product circle of relatives is renamed to Data Engineering. The following product names have changed: • Big Data Management --> Data Engineering Integration • Big Data Quality --> Data Engineering Quality • Big Data Streaming --> Data Engineering Streaming • Big Data Masking --> Data Engineering Masking Also, Enterprise Data Catalog and Enterprise Data Preparation are now aligned inside the Data Catalog product's own family. In our persisted efforts to offer a better search experience, we have delivered improvements to our Knowledge Base search results interface: Tabbed Navigation for seek effects MultiMedia Demo Widget. Tabbed Navigation for seeking results The seek outcomes page of the Knowledge Base has been redesigned to encompass tab navigation. The new tab view will display Knowledge Base articles, Product Documentation, How-To-Library, and Velocity Methodology in separate tabs. This new feature showcases the pri...
The world of the internet is predominantly owned by means of programmers. The one programming language this is rapidly converting and bringing change at an accelerating velocity is JavaScript. The React and Angular are the large systems that every novice and veteran programmer is engaged with. A new debate is being raised inside the programming international that which language is comparatively smooth to use. As both React and Angular are highly advanced and are used globally. Follow also my site Angular Training This blog evaluates both the languages to discover which one is less complicated for programmers to understand. React Vs. Angular Both Angular and React are unmarried page applications. Angular is a full-featured MVC framework, developed and maintained by using Google while React is an open-source JS library that is developed and maintained via Facebook. The device chain in React is high in comparison to Angular where it's miles low. ...
Through popular demand, here are my mind on comparing the cutting-edge country of MicroStrategy and Tableau, two of the leaders within the BI market are these days. What follows are merely my critiques from my stories. This isn’t clinical, it’s my opinion. I invite you to proportion your very own opinions and reviews inside the comments. My revel in I’ve used MicroStrategy for nine years, masking every possible crevice of the software and each viable role at groups of each length. I’ve been to 7 annual conferences, supplying at 4 of them. I’ve used Tableau for two years, the usage of the laptop as a developer and Server as a client, however not an administrator and only at 1 huge employer. I’ve been to 2 annual meetings, and I’ll be offering for the primary time and attending my 3rd convention q4. MicroStrategy’s Strengths MicroStrategy has a 14 12 months head start as an employer over Tableau, and as such has a miles large scope in the answers they off...
Comments
Post a Comment