robinheinze / ignite-trivia

A Trivia App based on https://opentdb.com/, built with Ignite Bowser with MobX State Tree and TypeScript
48 stars 21 forks source link

Error in the tutorial #31

Closed bruteforks closed 1 year ago

bruteforks commented 1 year ago

https://github.com/robinheinze/ignite-trivia/blob/master/app/config/config.dev.ts tutorial says: API_URL = "https://opentdb.com/api.php" but finished code shows: API_URL: "https://opentdb.com/api.php"

bruteforks commented 1 year ago

might as well put some other small mistakes here, since i'm going through tutorial.

Add an entry in en.json within the i18n folder for this screen’s text translations:

I think should be

Add an entry in en.ts within the i18n folder for this screen’s text translations:

bruteforks commented 1 year ago

<Text text="question" tx={"questionScreen.header"} />

should be:

<Text text="question" tx={"questionScreen.title"} />

bruteforks commented 1 year ago

some of my corrections may be incorrect, as i have no experience with this framework, or with typescript

First, we’ll add our QuestionStore to the app/models/root-store/root-store.ts.

to

First, we’ll add our QuestionStore to the app/models/RootStore.ts

then in the code

import { QuestionStore, QuestionStoreModel } from "../question-store/question-store" to import { QuestionStore, QuestionStoreModel } from "./QuestionStore"

bruteforks commented 1 year ago
  .views((self) => ({
    get allAnswers() {
      return shuffle(self.incorrectAnswers.concat([self.correctAnswer]))
    }
  )}  <----

to

 .views((self) => ({
    get allAnswers() {
      return shuffle(self.incorrectAnswers.concat([self.correctAnswer]))
    }
  })) <---

not applicable to many people but if you're not using VScode or don't have auto import turned on, you'll also need to add this to the imports: import shuffle from "lodash.shuffle"

bruteforks commented 1 year ago

project is broken. very frustrating. Hope you guys put time into fixing it.

cdanwards commented 1 year ago

@bruteforks thanks for commenting. I'm taking a look at some of these issues.

cdanwards commented 1 year ago

@bruteforks all the issues with the project should be updated. Most of them were just small oversights when transitioning the tutorial to Ignite Maverick and some of the naming convention changes with that.

Thanks for helping us keep the tutorial up to date!

bruteforks commented 1 year ago

nice!! thank you. hope it helped

bruteforks commented 1 year ago

@cdanwards this is the problem i ran into that made me give up on trying to fix. cloning and running this repo (not code from the tutorial) the radio buttons don't work. everything else looks like its working fine. Imagine it has something to do with the old library. Didn't feel like investigating further. hope it helps

edit: running the command suggested didn't help


WARN Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

Please update the following components: RadioButtons WARN Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

Please update the following components: RadioButtons

bruteforks commented 1 year ago

Kooha-2023-03-14-17-18-07