Coder Social home page Coder Social logo

reactbook's Introduction

reactbook's People

Contributors

stoyan 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

reactbook's Issues

React.DOM is undefined

use version 16 to build the code, but it failed in lesson ONE T_T, build 'Hello world' and then throw the error, HELP T_T

Image 1.5

I think that in the picture 1.5 in the first is the main error. React does not wrap the letter o and the word world into additional span tags

Minor cosmetic suggestion for Rating.css

I noticed that for the read-only Rating control (in the Whinepad app), the mouse pointer changes between an arrow (hovering over a highlighted star) to a vertical bar (hovering over a non-highlighted star). I was able to fix this by changing the cursor type from "auto" to "default" in the Rating.RatingReadonly style. This change allows the pointer to remain as an arrow no matter where it is in the control, at least using Chrome on Windows.

.Rating.RatingReadonly {
    cursor: default;
}

onClick(boolean) warning in rating.js

warning in chrome: Warning: Expected onClick listener to be a function, instead got a value of boolean type. It still works though.
for this code in render():
onClick={!this.props.readonly && this.setRating.bind(this, i)}
onMouseOver={!this.props.readonly && this.setTemp.bind(this, i)}
Instead, if you do this, no warning:
onClick = { !this.props.readonly ? this.setRating.bind(this,i) : null}
onMouseOver= { !this.props.readonly ? this.setTemp.bind(this,i) : null}

Story log in Excel does not record the first change

Since a strange ternary expression does not save the first "newState" value, the first is not saved to __log variable.

The fix may be as follows:

		, _logSetState: function(newState) {
			if ( this._log.length === 0 ) { // log first state
				let firstStateClone = this.state;
				this._log.push(firstStateClone);
			}

                        // always log newState
			let stateClone = JSON.parse( JSON.stringify(newState) );
			this._log.push(stateClone);

			this.setState(newState);
		}

Run whinepad 0.0.1 on the latest react

Hey Stoyan,
could you tell me please, how can I run examples from the folder whinepad v0.0.1.
It says http://prntscr.com/h3gt2z
Uncaught TypeError: Cannot read property 'arrayOf' of undefined
at Object.33.react (bundle.js:21004)

I guess it's in some way related to the new version of react but my knowledge is not enough yet to fix it by myself.
Or maybe could you advise how can I use old version using npm for examples of your book.
Thanks in advance!

PropTypes

in Button.js (page 111) PropTypes is not in React anymore, it's a separate import.
import PropTypes from 'prop-types';
also applies to Excel.js

Whinepad: getValue returns string for FormInput with type="year"

While modifying the tests to learn about recent upgrades to Jest, expect getValue() to be equal to the defaultValue prop failed for <FormInput type="year" defaultValue={2015} /> from the schema sample because "2015" was the actual value. Hurray for tests.

However, not being sure what to do if the input is not a number and yet not distract from the main point, I will refrain from submitting a pull request ;)

Chapter 7 - Eslint, Flow, Jest code is really hard to make working in 2018

Hey Stoyan, I'm reading chapter 7 of your React book and it's really hard to make the code working (especially for a novice in all that fancy instruments), some libraries are obsolete, some configs are not working, though I've managed to pull things together but it took a lot of time. So I thought maybe it would be useful for other folks to see real working examples without wasting a lot of time (though it was useful for me)
If you don't mind I'll post a link to working examples of chapter 7 (without real tests yet) here
https://github.com/ekonoval/reactBook7QA

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.