DEV Community

murshedkoli
murshedkoli

Posted on

JavaScript with another angle

  1. Framework or library First of all, JavaScript is not a Framework it's a library. the library is smaller than a framework. JavaScript Frameworks Example Is Angular, Vue Js.
  2. JSX
    JSX is a way to write JavaScript and Html Code at a time, for jSX we can mix javascript and HTML, CSS. without jSX we can't write HTML code in JavaScript and JavaScript code in HTML, It's possible for jSX.

  3. React Data goes Down
    Data in react always goes up to down, for example, we can pass data from the parent to child component with props.

  4. How to send data to parent
    In react we can pass data from child to parant, but we can't do this with props we can pass function as props and help of the function we can pass data child to parent component.

  5. Conditional Rendering
    In react we can easy do conditional rendering, for doing this we can declare a state after that we write our code depense on state. if change state value code render different element.

  6. Components
    Component is very helpful for write clean and readable coding, because of component we can write code in a page and named it after that we can use it again and again.

  7. Hooks
    React hooks originally is special function, all hooks start with word "use". hooks can use only in function component, we can't use it in class components.

  8. Virtual DOM diffing
    when some change is made by user the file is re-filtered and built a new Virtual DOM, now match old and new DOM for find difference. after find difference changes is applied to the actual DOM.

  9. State
    When a component need data than state is very useful. after fetch data we can store in state and use the data when need it. we can change state data using function.

  10. keep the state small
    for best coding experience and clean code always keep state small.

Top comments (0)