diff --git a/README.md b/README.md deleted file mode 100644 index 012bfe5..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# reactjs-beginner -react beginner's guideline by Maifee Ul Asad diff --git a/content/README.md b/content/README.md new file mode 100644 index 0000000..d71fc47 --- /dev/null +++ b/content/README.md @@ -0,0 +1 @@ +some contents like slides and other stuffs will be added here diff --git a/content/reactjs_beginner_mua.pdf b/content/reactjs_beginner_mua.pdf new file mode 100644 index 0000000..bc7472d Binary files /dev/null and b/content/reactjs_beginner_mua.pdf differ diff --git a/day/0/index.html b/day/0/index.html new file mode 100644 index 0000000..e96ffd2 --- /dev/null +++ b/day/0/index.html @@ -0,0 +1,150 @@ +
+

Day 0 - 2020.05.14

+

Intrduction

+

+ This is 2020, and this is an era of data. And we are all connected to some networks to make our lives easier. Doesn't matter which and what type of network. And most of them are connected to WWW, we simply call it just Web. In web we perform may operations. One major operation is presenting data. To present data we can follow different methodologies. But most interesting and widely used method is HTML. HTML was so static. To make it more cool, different scripting languages were introduced and different styling sheets were introduced too, to make it gorgeous. And a trio was formed all on a sudden HTML + JS + CSS. +

+

+ Now let's not waste time and try to know WHAT is REACT.JS ? +

+

+ React.js is a JS library. So what does a library do ? It provides us with more functionalities. +

+

+ Now, WHY we should learn REACT.JS ? +

+

+

+ Each and every one of them will be discussed if you guys stick to me. +

+ + +

Installation

+ +

+I will be using Node on Windows and Codesandbox all over the tutorial. Although react.js provides CDN, we won't be using that, we will also disscuss that in a while why we won't be using that all over our journey. But maybe for two or three instances we will use that. +

+ +

Node installation

+

+ Node can be downloaded from here : Node official +

+

+ Select your configuration and download. + Try to download a latest and also stable(LTS) version. +

+

Validating Node installation

+

+ If you have made this far. + Run this command to check its installation : +

node -v
+

+

React installation

+

+Now run the following command to install react : +

npm install -g create-react-app
+We will even discussing about all command in a while. +

+

Validating React installation

+

+If everthing works fine be the following command we will be able to generate an empty react application. +This will take time, if you don't have SSD and a good network connection it will take a lot of time. +So take a nap, or do some other thing. Check for this in while. +When you see happy hacking, it's time do some hacking. +

create-react-app project-name
+Now run the following command : +When the application is generated successfully we will be able to run it by this command. +
npm start
+This will also take some times. Now you will seeing two IP addresses on the DOS-BL, enter anyone of them. Both will work. +Local - is only for you. And netowrk is for, is you want to share it with someone over the network real-time. Keep in mind the user must be in same netowrk. +

+ +

Web IDE

+

Those who have low configuration PC or having problem with installation, just carry on with a Web IDE. I personnally use codesandbox and recommend it. Here is the link : Codesandbox.io

+

Signup with Github. Now click on - "Create a sandbox, its free". There you should see under Official template - React(Codesandbox team)

+ + +

Conclusion

+We just setup our environment. We will start next week. Thanks. If you encountered any problem, feel free to mail : maifeeulasad@gmail.com with subject "React Tutorial - day - 0", or create a bug report in my git repository : here. Give title like - "Day - 0 - little description" + + + \ No newline at end of file diff --git a/day/1/index.html b/day/1/index.html new file mode 100644 index 0000000..b44b95b --- /dev/null +++ b/day/1/index.html @@ -0,0 +1,254 @@ +
+

Day 1 - 2020.05.19

+

Basic JS - Part 1

+

+ Let's assume we all have no problem with the introduction. So let's carry on. To get started with React.js, first we need some basic knowledge about JS. As we all have Node installed in our Windows machine. We can just run any JS code without facing any difficulties, just open your CMD and type node. That's all, now you should see a > (arrow pointing right, so you are ready for upcomings) +

+

+ Todays sections : +

+

+

+ These are the basic JS, we must need to know for React.js, so hold tight. +

+

Print

+

+ To print something, we will use the methods below : +

+
> console.log("hello world")
+hello world
+undefined
+> console.debug("hello world")
+hello world
+undefined
+> console.error("hello world")
+hello world
+undefined
+> console.info("hello world")
+hello world
+undefined
+>
+

+ All prints exactly the same. Right ? And there are many more methods for logging or printing(actually to assist these or customize these functions output), but these are the 4 methods for printing. We will eventually find out when and where to use which one. For now we will be using console.log(...) only. Actually the don't print exactly the same, when we will be doing this on a browser or on a colorized environment, we will find out the difference. +

+

+ And another question is wht there is a undefined at the end of every output ? - Just ignore it. And DON'T try to even search on Stackoverflow or Quora, and try to disble this. If you do so, you will face serious issues in debugging your code in the future. For now just bear in mind that it just prints whatever those funtions returns you have entered. +

+

Variable and Primitive types

+

+ First stop variables +

+
> var a//we have just declared a variable named a
+undefined
+> console.log(a)                  //let's see what this a contains
+undefined                         //it contains undefined, unlike C, it doesn't contain grabage value, as we haven't initialized the variable a
+undefined
+> a=19                            //let's assign value to a
+19
+> console.log(a)                  //and try to see it's value again
+19                                //ok, it holds 19 as we have assigned 19 to it
+undefined
+> a="maifee"                      //let's try assigning something again and of different type, as 19 was number and "maifee" is string
+'maifee'
+> console.log(a)                  //and print again
+maifee                            //it prints 'maifee', why ? - cause JS is loosely typed language, means we can change any variables type, means - it doesn't restrict variable of changing types
+undefined
+> console.log(b)                  //let's try printing something, we haven't defined yet
+Thrown:
+ReferenceError: b is not defined  //we get error, as we should, as it is not declared
+> var b                           //we have declared another variable called b
+undefined
+> console.log(b)                  //lets try once again
+undefined                         //it's fine
+undefined
+>
+

+ We have 9 types in JS. Why don't we just directly try them : +

+
> console.log(typeof 19)
+number                      //19 is a number
+undefined
+> console.log(typeof 'maifee')
+string                      //"maifee" or 'maifee' is a string
+undefined
+> console.log(typeof false)
+boolean                     //true and false are of type - boolean
+undefined
+> console.log(typeof {})
+object                      //{} looks like an object(more precicely JSON object), and it is an object
+undefined
+> console.log(typeof [])
+object                      //arrays are treated as object
+undefined
+> var c=null
+undefined
+> console.log(typeof c)     
+object                      //variable c has been created and assigned with some value, but this value doesn't represent any specific type for now, so it is also treated as object
+undefined
+> var d
+undefined
+> console.log(typeof d)     //variable d create but not assigned, so no need to even think about type of d, so d is undefined
+undefined
+undefined
+> console.log(typeof function test(){})
+function                    //you know it, when you see it
+undefined
+> console.log(typeof null)
+object                      //funny right ? 
+undefined
+> console.log(typeof undefined)
+undefined                   //now i'm serious. Actually - is JS, when variable are created and not assigned it is assigned with 'undefined', but if you initialize it with null or later assign it to null, the reason is explained just check last few comments(may last 4th from here?!?)
+undefined
+>
+

+ We have seen 'number','string','boolean','object','function' types for now, and already seen 'undefined'. Other types are - 'symbol', 'bigint'. And maybe in future we won't be seeing them. LOL. And 'null'? - Can you really have something with typeof null ? Cause 'undefined' and 'object' are better player here. +

+

+ Let's try to know about let, by example : +

+
> {var x=435;console.log(x)}
+435
+undefined
+> {var x=435;{console.log(x)}console.log(x)}          //line 1
+435
+435
+undefined
+> {var x=435;{console.log(x+"inside")}console.log(x+"outside")}         //line 2
+435inside
+435outside
+undefined
+> {var x=435;{var y=45654;console.log(x+"inside");}console.log(x+"outside")}          //line 3
+435inside
+435outside
+undefined
+> {var x=435;{var y=45654;console.log(x+"inside x");console.log(y +"inside y")}console.log(x+"outside x")}          //line 4
+435inside x
+45654inside y
+435outside x
+undefined
+> {var x=435;{var y=45654;console.log(x+"inside x");console.log(y +"inside y")}console.log(x+"outside x");console.log(y+"outside y")}         //line 5
+435inside x
+45654inside y
+435outside x
+45654outside y
+undefined
+> {var x=435;{var y=45654;let z=1;console.log(x+"inside x");console.log(y +"inside y")}console.log(x+"outside x");console.log(y+"outside y")}         //line 6
+435inside x
+45654inside y
+435outside x
+45654outside y
+undefined
+> {var x=435;{var y=45654;let z=1;console.log(x+"inside x");console.log(y +"inside y");console.log(z+"inside z");}console.log(x+"outside x");console.log(y+"outside y");console.log(z+"outsize z")}         //line 7
+435inside x
+45654inside y
+1inside z
+435outside x
+45654outside y
+Thrown:
+ReferenceError: z is not defined
+>
+

+ What actually happened here ? - +

+

+

+ Now, lets try to know about const +

+
> const ff=5
+undefined
+> console.log(ff)
+5
+undefined
+> ff=55
+Thrown:
+TypeError: Assignment to constant variable.
+> const test_var;
+Thrown:
+const test_var;
+      ^^^
+
+SyntaxError: Missing initializer in const declaration
+>
+Do we really need an explaination here ? - We can't just reassign constant variables. And const variables, must be initialized, when declared. +

Conclusion

+If anyone has any issue or clarification, feel free to mail at : maifeeulasad@gmail.com with subject "React Tutorial - day - 1", or create a bug report in my git repository : here. Give title like - "Day - 1 - little description" +

Next : 2020.05.23 or 2020.05.24, try to keep up like this till I intigrate with a way more managable calander or something

+ diff --git a/index.html b/index.html new file mode 100644 index 0000000..08ecf26 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ +

reactjs-beginner

+

react beginner's guideline by Maifee Ul Asad

+ +

+List : +

+ + + +