Git Product home page Git Product logo

Comments (8)

CouchofTomato avatar CouchofTomato commented on June 16, 2024

@TheOdinProject/javascript Can someone take a look please.

from curriculum.

thatblindgeye avatar thatblindgeye commented on June 16, 2024

however, for some reason, some people find useEffect kind of difficult

@royalh23 have you noticed any trend in reasoning for this, or has it more been that people express difficulty without reason expanding on what that difficulty is?

Explicitly mentioning that a useEffect needs to be used may be a good idea here regardless. The lesson on effects doesn't exactly go into useEffect with fetching data too in depth from a quick glance (there's a very short sentence or two that quickly mentions "external systems like an API", but beyond that I don't believe there's anything), so it may not be super apparent that's the expectation here.

I am wondering if we should update the effects lesson to go into more detail about other times to use the useEffect hook, but as far as this issue goes adding some verbiage to the project may be good. I'd like to hear your response to my above question first before assigning, though.

from curriculum.

MaoShizhong avatar MaoShizhong commented on June 16, 2024

Fetching in react, including with useEffect is gone into much more detail in a later "Fetching Data in React" lesson.

I can't remember the exact reason, but I remember reading that the decision to require a basic fetching in Memory Card before the proper Fetching lesson was intentional. Perhaps because fetching is not anything special and doesn't actually have to be done in an effect in order to work, and the fetching lesson just expands on React-specific stuff.

Perhaps @01zulfi might have more insight into this.

from curriculum.

thatblindgeye avatar thatblindgeye commented on June 16, 2024

If it's intentional then maybe this is fine. If we wanted to make a change (not necessarily saying we would have to) we could add a note in this project about covering fetching data in React in more detail later, or update the fetching lesson to call back to this project (You may have done XYZ back in the [Memory Card project](...) or something).

from curriculum.

01zulfi avatar 01zulfi commented on June 16, 2024

I don't exactly remember at the top of my head, but I do think we might've kept on how to fetch in memory card project purposefully vague. I wanted learners to decide on their app's behaviour and built their React components around them. Let's say they want to load data on a user event i.e. button click then they wouldn't need an effect. But if they want to load data on page load, then they'll need an effect. Similarly, will data be fetched on every user selection, or is it a one time thing? I want the learners to come up with their solutions as they see fit. Adding in a "you might need useEffect" will force learners to use effect (lol) even if they could've done without it.

Additionally, the requirement for fetching from external api in memory card project is intentional even if the course doesn't formally guide the learners. I want them to Google/research their way into completing the project, and then come across the fetching data lesson with a understanding of the problem.

from curriculum.

thatblindgeye avatar thatblindgeye commented on June 16, 2024

^ That all sounds good to me. Especially for this point in the curriculum (didn't realize exactly where React course was placed at first 😆 ), providing less explicit instruction makes sense to help users figure things out themselves/do things their own way.

from curriculum.

royalh23 avatar royalh23 commented on June 16, 2024

@royalh23 have you noticed any trend in reasoning for this, or has it more been that people express difficulty without reason expanding on what that difficulty is?

@thatblindgeye I've seen some people ask if it's okay not to use effects in the project since they can basically fetch data inside an event handler.

@01zulfi @MaoShizhong I mean if learners don't use effects in the project, how will they get the chance to practice useEffect? They might be using effects in the upcoming projects but Memory Card feels like a sweet spot because it comes right after introducing effects.

from curriculum.

MaoShizhong avatar MaoShizhong commented on June 16, 2024

I think I'll defer to @01zulfi first, given he was more directly involved with the React course's intentions and direction. Would greatly value his opinion here.

from curriculum.

Related Issues (20)

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.