learn-co-curriculum / react-async-gif-search-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
This Lab is already coded out and working, not sure if it is supposed to be like that or not. there really wasn't anything to do
It looks like the latest commit (bbcc70b) may actually include the solution to this lab. When I ran npm start, the app was fully functional, and all components appeared to be built correctly.
Prior labs show functional components created using arrow functions, where this lab deviates using ES5 function declaration. Should be refactored for consistency.
In addition, solution branch has merge conflict persisted in App.js
I read through the instructions, but it looks like all of the code complete the requirements has already been written. I had to fix one bug, but otherwise everything worked as described. Perhaps you uploaded the solution instead of the template?
https://github.com/learn-co-curriculum/react-async-gif-search-lab , the commit shows github username made a commit 27 days ago with a completed lab.
Here's what I get when I click on the "Open IDE" link and it tries to open on IDE:
W
[19:40:20] ~
// ♥ learn open react-async-gif-search-lab-v-000
Looking for lesson...
/usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/lessons/ios_lesson.rb:6:in detect': undefined method
any?' for false:FalseClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/lessons.rb:20:in block in classify' from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/lessons.rb:19:in
each'
from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/lessons.rb:19:in find' from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/lessons.rb:19:in
classify'
from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/opener.rb:36:in run' from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/lib/learn_open/opener.rb:11:in
run'
from /usr/local/rvm/gems/ruby-2.3.1/gems/learn-open-1.2.21/bin/learn-open:7:in <top (required)>' from /usr/local/rvm/gems/ruby-2.3.1/bin/learn-open:23:in
load'
from /usr/local/rvm/gems/ruby-2.3.1/bin/learn-open:23:in `
There's a tricky bit with the fetch request that tripped a number of people in my cohort up: CORB blocks the url that seems like it would be the right one for loading the GIFs, which is the value of the "url" key in "data"; you have to use images.original.url. A note about that might save some people a lot of unnecessary headaches in the future.
Because the lab instructs students to use the same API key, they can hit limit issues which creates a CORS error. This can be circumvented by having the students get their own API key, but that's a lot of work for one lab. While it's cool to use an external API, we may want to rework this to use a local one just for simplicity's sake.
Add missing letter "I"
original:
following the **[]**nstructions on Giphy's developer site.
Missing period
original:
and the component**[]**
Change "container" to "contain"
original:
For now, just know that container components [container] other components
The gifs that are returned by the Giphy API for this lab are blocked by CORB. After following the documentation provided in the warning message, it appears that Giphy is providing the wrong Content-Type in its response.
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://giphy.com/gifs/dolphin-cute-ZhEdAJ6aqEjYc with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
The warning states that the MIME type is text/html
. In the documentation provided by chromium, it states that rarely CORB will block a response for this reason. The only solution it offers is to notify the site they are providing the wrong Content-Type. Beyond that, completely disabling the security check is likely the only other way to allow these gifs through.
Here is a link to the documentation: https://www.chromium.org/Home/chromium-security/corb-for-developers
In the third paragraph under "What should I do about CORB warnings reported by Chrome?", it addresses this issue.
Is this right? I pulled open the project and the fully-working code is already in the master branch, with the GIF search functioning on fetch.
This Lab is missing a solution branch.
Need to remove the apostrophe here:
"It receives data from it's props and renders html given the input data."
Thank you.
The top bar and search bar render as plain text with no styling, which the lab expressly states will not happen.
Update from 2019: I wrote this article a long time ago and my views have since evolved. In particular, I don’t suggest splitting your components like this anymore. If you find it natural in your codebase, this pattern can be handy. But I’ve seen it enforced without any necessity and with almost dogmatic fervor far too many times. The main reason I found it useful was because it let me separate complex stateful logic from other aspects of the component. Hooks let me do the same thing without an arbitrary division. This text is left intact for historical reasons but don’t take it too seriously.
-- Presentational vs Container Componets: Dan Abramov
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.