Giter VIP home page Giter VIP logo

react-demos's Introduction

Demos Using TypeScript and React

React Demos implemented using TS and React Functional Components

Netlify Status

Index

๐Ÿ“–

Why Though?

One repository that is a collection of demos (small contained projects that can live in its own component), and react-based code challenges where I can learn TypeScript and further explore my React Skills by implementing simple demos (clock,counter,etc), optimzation techniques (memoization, composition, debounce, etc), and react code challenges.

vs....

creating multiple 'overkill' create-react-app projects for each demo or optimization, code challenges.

Deployments

Active Deployments

TypeScript with React Best Practices

Each Component is implemented using the following guidelines:

  • Provide Explicit Types for all Values
  • State as a function: next state is based on the previous State
  • Manage the multiple possible states of variables with an Object (constant)
  • Component Render logic is as function-free as possible (make references vs inline definitions)
  • Clean conditionals
  • Use JSX shorthands (i.e. someProp vs someProp={true})
  • Opt for string props vs string props with curly brackets

React Code Challenges

Using TypeScript, solve LinkedIn React.js Code Challenges

  • Color Renderer - build a color renderer that will display color swatches on a user interface

    • Given: make from scratch
    • Requirements: Update the ColorRender component to display one instance of the Color Component for each color in the array of colors
  • DarkMode - implement a component that allows you to change from light to dark

    • Given: make from scratch
    • Requirements:
      • when darkmode button is clicked the page should be displayed in darkmode
      • when lightmode button is clicked the page should be displayed in lightmode

Active Demos

Simple Demos

  • Analog Clock
  • Calculator
  • Counter
  • Digital Clock
  • Image Scraper
  • Login Form
    • Sub Features:
    • Signup Form
    • Reset Password Form
  • Auth0 Login Form
    • Sub Features:
    • Signup Form
    • Reset Password Form
  • Query a Table
  • Searchable Photo Gallery
  • Streak Counter
  • Stop Watch

Optimization Techniques

  • Cache Component
    • with useState Hook
    • with useRef Hook
  • Composition
  • Debounce
  • Memoization
  • Throttle

Demo Functionality and Features

  • Counter Component

  • Login Component

    • Display Login form with username, password, login button, rememebr me, sign-up on the screen
    • User can input the values on the displayed form
    • Validation of the username and password
    • Display error message on login fail
    • Display success message when login succeeds Login Sub Components :
    • Profile Component
      • Display personalized content ( users personal data ) when login successfull
      • Display welcome message, username, last session
      • Display Logout Button
      • User is able to sign out
      • StretchGoal: User is able to update Profile Pic
      • StretchGoal: User is able to update Username
    • Signup Component
      • Display Modal that displays Signup form with new username, new password, signup button
      • Display success message when signup succeeds
      • Redirect user to Login Form
    • Reset Password Form Component
      • User is able to reset password
      • Display Modal that displays Reset Password form when click hyperlink
      • Redirect user to Login Form

Roadmap (tentative)

  • Create Basic React and TypeScript project using create-react-app tool
    • prune the template project created from create-react-app + keep cool-looking react logo
  • Deploy main branch to Netlify
  • Add CI/CD via GitHub
    • create .gh dir
  • Add Testing using Jest
  • Web Responsive on most devices (i.e. mobile,tablet,laptop, widescreen etc)

Available Scripts

In the project directory, you can run:

npm start Runs the app in the development mode

npm test Launches the test runner in the interactive watch mode

npm run build Builds the app for production to the build folder

Resources Used

APIs

Best Practices: React with TypeSript

Personal Road Blocks

ssh key identity missing

  • problem: on local branch push to remote repo
  • outputs error:
    git push origin style/Counter-Component/MUI-styling
    [email protected]: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
  • solution: Generate a new SSH key and add it to the ssh-agent on local machine

Show your support

Give a โญ๏ธ if this project helped you!

License

License MIT

react-demos's People

Contributors

antoni909 avatar

Watchers

 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.