Giter Club home page Giter Club logo

react_playground's Introduction

simple react playground

This is a simple react project that allows for you to mess with the basics of React. It comes with some npm commands that make it easy to get up and running.

I have tested this on node v6.7 although I am pretty sure it works for other versions as well!

# install dependencies
$ npm install

# start express server, access at http://localhost:3006/
$ npm start

# build client-side js
$ npm run build

# watch client-side js
$ npm run watch

project goal

For this exercise, extend the existing React setup to toggle the 'Content' view when a user clicks the elements on the nav bar on the left. The only requirement is that you create a few more components that represent each of these views. Other than that, you can approach this any way you'd like - there is no wrong answer here.

When a user clicks on a new nav element, it should switch the content to that view and highlight the new nav element. Don't worry about styling, this is just to go over some basics of React.

If you have any questions, please email or shoot me a text!

Comments from Joe:

A few things I wanted to call out:

First, I initially implemented the "tracking" of which route was the current one by basically pushing a two-way binding of sorts in to React. The React patterns seem pretty focused on one-way data flow, but it's certainly something that will come up I think, and I wanted to try it out. In any case, it worked, and I sort of wanted you to see it, but I felt that wasn't the "React way" so I implemented something else (which I think is a pretty React-y way to get it done).

Second, the components I created to actually load based on the navigation have nothing to them, just a line of text. It didn't seem like that's what you were looking for. If you want me to try something more interesting with those, just let me know.

Third, I chose to put the navigation options in a module and pass them to the navigation components via props. I wouldn't necessarily do it that was for a "real" app, but I felt it was a good way to get used to working with props and it did make the navigation options a little more orderly.

react_playground's People

Contributors

jmazrimas avatar

Watchers

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