Code Monkey home page Code Monkey logo

reactjs-code's Introduction

ReactJS-Code

This repository contains Namaste React Learning and INT252 Classroom Learning codes

Parcel Provides

  • parcel is bundler
  • Dev Build
  • Local Server
  • HMR = Hot Module Replacement
  • File Watching Algo - written in c++
  • Caching - Fast Build (Fast Development) -Image Optimization
  • Minification
  • Bundling
  • Compressing
  • Consistent Hashing
  • code Splitting
  • Differential Bundling -> gives availability support older browser
  • Diagnostic
  • Error Handling
  • Https -> runs on ssh/http also
  • Tree shaking - remove unused code
  • Diffenent dev and production bundles

Babel -> it is js compiler that convert jsx to react element (It is beast)

for suggestion in tailwind press (ctrl+spacebar)

2 Types of Routing in web apps

  • Client Side Routing
  • Server Side Routing

Redux Toolkit

  • Install @reduxjs/toolkit and react-redux
  • Build our store
  • Connect our Store to our app
  • Slice (cartSlice)
  • Dispatch(action)
  • Selector

Types of testing (for developer)

  • Unit testing
  • Integration testing
  • End to End testing or e2e testing

Setting up Testing in our app

  • Install React Testing Library
  • Install jest
  • Install Babel dependencies from jest lib/website
  • Config Babel from jest website
  • Config Parcel Config file to disable default babel transpilation
  • Jest configuration by npx jest --init
  • Install jsdom library from react testing library (if jest version is greater than 28 than install this separately npm install --save-dev jest-environment-jsdom)
  • Install @babel/preset-react -so that to make JSX work in test cases
  • Include @babel/preset-react inside my babel config
  • Install @testing-library/jest-dom

tests

  • this __ __ means dunder method. it is use as reserve word

reactjs-code's People

Contributors

abhinandan-sah avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.