Code Monkey home page Code Monkey logo

react-daily-ui's Introduction

React Daily UI Dolpins

A collection of React apps built by Jack Oliver and blogged by Sophia Shoemaker and the Fullstack React team.

Check out the full CodePen collection here.

We are excited to be partnering with Jack Oliver, a designer and developer who is embarking on an ambitious project to create 100 React UI components in 100 days.

In the series, we will be taking Jack Oliver's code and design and desconstructing them to give you a step-by-step picture of how all the pieces fit together and hopefully inspire you to write some React code of your own.

Days

Day Preview Description Blog
001 Create a sign-up form โœ… ๐Ÿฌ โžก๏ธ
002 Checkout form โœ… ๐Ÿฌ โžก๏ธ
003 Netflix Landing Page โœ… ๐Ÿฌ โžก๏ธ
004 3D Calculator โœ… ๐Ÿฌ โžก๏ธ
005 Weather App Icon โœ… ๐Ÿฌ โžก๏ธ
006 Profile Page โœ… ๐Ÿฌ โžก๏ธ
007 Reactagram โœ… ๐Ÿฌ โžก๏ธ

Instructions

All of Jack Oliver's original designs and code are hosted on Codepen. For the purposes of this blog series, we have created this Github repository containing all the code for each daily component.

We've used the create-react-app tool to set up our environment. To run the code cd into each individual folder and run the following commands:

  1. npm install will install all the libraries you'll need to get each Daily UI running.

  2. npm start compiles all of your files and boots up a dev server. Browse to localhost:3000 to find your application running.

Prerequisites

You'll need to have node and npm installed on your machine to run the commands. Head over to the node.js website and download the neccessary files to get those installed.

Authors

This series is a joint effort between:

Contributing

git clone https://github.com/fullstackreact/react-daily-ui.git
cd react-daily-ui

Fullstack React Book

Fullstack React Book

This React Daily UI repository was built alongside the React Daily UI blog series.

This repo was written and is maintained by the Fullstack React team. In the book we cover many more projects like this. We walk through each line of code, explain why it's there and how it works.

This collection React application only a sample of what our book offers. If you're looking to learn React, there's no faster way than by spending a few hours with the Fullstack React book.

react-daily-ui's People

Contributors

arreche avatar auser avatar bongosway avatar jashmenn avatar mrscobbler avatar remexllee avatar tuanluu-agilityio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-daily-ui's Issues

Input data when using pluralize add not correct

Currently when we drag on slider header to 1, day value still days not day as expect. Reason duration value on slider header return a string not a number so pluralize not working fine.
Please take a look image below:
pluralize-error

var duration = this.props.duration + " " +pluralize('day',this.props.duration);

On description of pluralize here: https://www.npmjs.com/package/pluralize
It should be a number.

Thanks,

Error in eval()

2+-3 or 2/3 and these kind of expressions are causing error in eval()*

import React, { Component } from 'react';
import update from 'immutability-helper';
import math from 'mathjs';
import './App.css';
import Display from './Display';
import Button from './Button';
import Buttons from './Buttons';

class App extends Component
{
  constructor()
  {
    super();
    this.state={
           operations: []
    };
  }

  calculateOperations = () => {
    var result = this.state.operations.join('');
    if(result)
    {
      result = String(math.eval(result));
      this.setState({ operations : [result] });
    }
    
  }

  handleClick = e => {
    var value = e.target.getAttribute('data-value');
    switch (value)
    {
      case 'clear': this.setState({ operations: []});  break;
      case 'equal': this.calculateOperations();  break;
      default: var newOperations = update(this.state.operations, {$push: [value]});
               this.setState({operations: newOperations}); break;
    }
  }

  render()
  {
    return (
      <div className="App">
        <Display data={this.state.operations} />
        <Buttons>
          <Button onClick={this.handleClick} label="C" value="clear" />
          <Button onClick={this.handleClick} label="7" value="7" />
          <Button onClick={this.handleClick} label="4" value="4" />
          <Button onClick={this.handleClick} label="1" value="1" />
          <Button onClick={this.handleClick} label="0" value="0" />
          
          <Button onClick={this.handleClick} label="/" value="/" />
          <Button onClick={this.handleClick} label="8" value="8" />
          <Button onClick={this.handleClick} label="5" value="5" />
          <Button onClick={this.handleClick} label="2" value="2" />
          <Button onClick={this.handleClick} label="." value="." />
          
          <Button onClick={this.handleClick} label="x" value="*" />
          <Button onClick={this.handleClick} label="9" value="9" />
          <Button onClick={this.handleClick} label="6" value="6" />
          <Button onClick={this.handleClick} label="3" value="3" />
          <Button label="" value="null" />
          
          <Button onClick={this.handleClick} label="-" value="-" />
          <Button onClick={this.handleClick} label="+" size="2" value="+" />
          <Button onClick={this.handleClick} label="=" size="2" value="equal" />
        </Buttons>
      </div>
    );
  }
}

export default App;

Lag

Why is the codepen demo so laggy?

License?

Hello,

Love these demos, super helpful to learn, especially the Netflix one - well done!
I'd love to use it for my demo, but not sure what kind of license are you open sourcing it with.
Could you please add one?
// Sorry for a boring question ๐Ÿ™ˆ

Thanks!

Improper props attribute "name" being used

id={this.props.name} should be id={this.props.id}

You are calling it like

                                          <Input
                                                  id="name"
                                                  type="text"
                                                  placeholder="Jack-Edward Oliver" />

But using it like

                                  <input
                                          id={this.props.name}
                                          autoComplete="false"
                                          required
                                          type={this.props.type}
                                          placeholder={this.props.placeholder}
>>                                />

I'm new to React but I don't see where the "props.name" property exists.

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.