How to write βοΈ your notes π, blog r even your github repositories with the markdown markup lang.
Letβs learn d following:
β’ headings
β’ text styling
β’ links
β’ syntax
β’ paragraphs
β’ lists
β’ tables
Follow d thread 𧡠2 read them π #DEVCommunity#100DaysOfCode#markdown
1οΈβ£ Headings
For headings just insert the # before heading. And the numbers of # defines the heading number.
2οΈβ£ Text styling
To make bold use **text**
To make italic use * text * or _text_
For both use **_text_**
3οΈβ£ Links
β’ Links are created with large brackets[] & small ()
[link name](href)
β’ for images use ! Before large brackets
![dog](link)
β’ also can show the reference by giving a more large brackets
![dog][dog-ref](link)
[dog]: link
4οΈβ£ Syntax
Also can write 1 line code or a block of code π¨βπ»
β’ wrap the code with back ticks ` return βhelloβ`
β’ Or wrap with 3 ``` to write block.
β’ With opening 3 back ticks mention the language & code will have that style.
like
```javascript
```
5οΈβ£ Paragraphs
Write paragraphs consecutively and if you leave line in between then new paragraph will start.
β’ for new line put the 3 spaces after the line.
6οΈβ£ Lists
Lists are unordered and ordered and they can be nested together.
β’ for Unordered just put the * and space before.
β’ for ordered put the 1. and space before.
7οΈβ£ Blockquotes >
For blockquotes just put the > greater than sign before text. You can also add for the blank lines to extend the quote.
8οΈβ£ Tables
Tables are also easy to write just follow the pattern.
| column name | column name |
| ββββββ- | βββββββ |
| text | text |
To align the data in table just put the colon : to the dashes -
β’ left :ββββββ-
β’ center :ββββ-:
β’ right βββββ-:
9οΈβ£ Tasks
for tasks use the following pattern
-[x] task1
-[ ] task2
β’ x means task is done β
β’ blank means remaining task.
π‘𧡠Props drillingβ
In react when you have a tree of a components and want to pass the data to the last component, you have to pass props through every component in tree and re-render all components on change. this is problem called as props drilling.
this problem is like having a box within a box within a box. when you want to change things in the inner most box you have to open all the outer boxes to reach there every time. that's the case of props drilling, that you have to pass the props and re-render components.
To avoid this problem there's a solution. π₯
Define the data globaly and then access it within the components you want and re-render the only components consuming data.
how to do that? 1. createContext 2. Provide context 3. Consume context
2/100 days of learning React.
export default vs named components in react.
In react view is built with components. components are exported before importing them.
Two way we export them either as default or named.
know more ππ§΅
Explaining Loop π 1.
Loop is the fundamental building block of programming, used to repeat or iterate the fixed number of steps.
Loop saves the time and labour.
2. Real time example
Suppose you are donating $100 to each one of the 50 homeless.
For that you will keep count of people who are you done with.
So, 3 things we r doing:
β’ setting condition to 50
β’ counting ( increment )
β’ donating
3.
There are many ways out there to implement loop in programming:
β’ foor loop
β’ while loop
β’ forEach
β’ do while
and many, you can also develop your own.