GithubHelp home page GithubHelp logo

palashmon / thinking-in-react Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 2.0 107 KB

A walk through the thought process of building simple apps using React

HTML 6.42% CSS 11.26% JavaScript 82.31%
reactjs thinkinginreact component subcomponents single-responsibility-principle

thinking-in-react's Introduction

Thinking In React

A walk through the thought process of building simple apps using React blog post "Thinking in React" concept.


Steps

  • Start With A Mock
  • Break The UI Into A Component Hierarchy
  • Build A Static Version in React
  • Identify The Minimal (but complete) Representation Of UI State
  • Identify Where Your State Should Live
  • Add Inverse Data Flow

Practice Apps

Simple Product List

A simple product list display app with simple user interaction. Components hierarchy is like:

  • FilterableProductTable
    • SearchBar
    • ProductTable
      • ProductCategoryRow
      • ProductRow

Our state lives in FilterableProductTable like state = {filterText: '', inStockOnly: false}. Then, we pass filterText and inStockOnly to ProductTable and SearchBar as a prop. Finally, we use these props to filter the rows in ProductTable and set the values of the form fields in SearchBar.

Simple Card List

A simple card list display app. First we create a Card component and once we have a single Card component rendering, we try to display a list of them with some fake data. Components hierarchy is like:

  • Cards
    • Card
      • CardImageTop
      • CardBody
        • CardTitle
        • CardText

Shuffle Cards

A simple project to shuffle a deck of cards. When the deck has been shuffled users are given the option to reset the deck back to the initial state or continue shuffling. Components hierarchy is like:

  • Deck
    • Card
      • CardTop
      • CardNumber
      • CardBottom

thinking-in-react's People

Contributors

dependabot[bot] avatar palashmon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.