learn-co-curriculum / react-simple-state-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Is it possible to show a solution for those learning this code for the first time, to adhere to just "state" and "props" and use code that follows the instructions given in the lab? Please?
requires local version through forked copy for the lab server to start.
Students are able to get the tests to pass but the app doesn't display in the browser.
I tried cloning the solution down to my system to test and that also did not work in the browser.
I don't have the bandwidth to look into it myself but if someone is able to check the recent PRs I know the lab has worked properly in the past, maybe they can locate the breaking change.
Syntax for the genRow and genMatrix use one line arrow notation. Lab asks the user to insert a console.log into the code to help understand. This will throw an error, recommend replacing the () after => with {} so two lines of code will not throw an error.
Click handlers need to be explained in the reading or a resource should be given (and its purpose explicitly stated).
I was getting this spec error:
`1)
has an event listener that, when clicked, calls this.setState() once (make sure you aren't setting state directly, but instead using the component's 'setState' method):
AssertionError: expected false to equal true
+ expected - actual
-false
+true
at Context.<anonymous> (test/1-Cell.test.js:52:36)
`
but I have a setState() method on my Cell component:
It would appear that the sinon.spy is not working for this spec:
it("has an event listener that, when clicked, calls this.setState() once (make sure you aren't setting state directly, but instead using the component's 'setState' method)", () => { const setState = sinon.spy(Cell.prototype, 'setState'); cellWhite.find('div').simulate('click') expect(setState.calledOnce).to.equal(true); })
The resolution the technical helper and I came to was to comment out this spec.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.