Git Product home page Git Product logo

thinking-in-react's Introduction

ReactJS Fundamentals - Thinking in React

The goal of this exercise is to learn how to think in React.

Prerequisites

You need to be comfortable writing JavaScript and HTML to do this exercise. The exercise uses the following ES6 & ES5 features:

You need to have nodeand npminstalled in your computer.

If you find this exercise too difficult

If you find the exercise too difficult we recommend you to do the following basic React course from freeCodeCamp before.

Getting started:

git clone [email protected]:leanjscom/thinking-in-react.git && cd thinking-in-react && npm install && npm start

Exercise

Before you start, there are two types of components Functional Components and Class Components. Try to use a Functional component if the component doesn't have state, you'll need to refactor code a few times during the next exercise :)

Tasks

1- Refactor the “about” and “footer” sections by creating a functional component for each. Make sure everything works.

2- Refactor the navbar by creating a Functional Component (AKA stateless components) and pass the dependencies (this.toggleMenu in this case) via props. Make sure everything works by clicking on the "Training" button at the top right of the screen.

3- Refactor the books section by creating a functional component and pass the dependencies via props. Make sure everything works.

4- Is there any state in app that should be in the Books component? Refactor <Books> books if appropriate. Should <Books> be a Functional Component or a Class Component now?

5- Break <Books> down into <BookList> and <BookFilter>

6- What do you think it would make sense to componentize next? Are there any parts on that view that you can reuse? Try to explain to a mentor what you want to refactor before you code :)

Articles and links

License

This material is available for private, non-commercial use under the GPL version 3.

thinking-in-react's People

Contributors

alexlobera avatar andie5 avatar ric9176 avatar evandyou avatar foxreymann avatar

Watchers

James Cloos 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.