fojanb / Food-Recipe-App

Food Recipe App - React Hooks - Function-Based Component
5 stars 2 forks source link

Some small improvements #1

Open Magicianred opened 3 years ago

Magicianred commented 3 years ago

As we talken in this issue https://github.com/fojanb/weather-app/issues/1 I try the use of .env file

For test the correct use I simply proceeded with this verification:

  1. I have create the file .env with the variable you have used in the app with some value
  2. I have put some console.log for show the value
  3. I have run (or re-run) the npm start and I see that the value is that I have put in .env file
  4. I have create .env.local with the different values and I ave re-run the npm start and I see the values is the new ones

You have correct implement the .env file feature :) well done

I suggest you some other small improvements:

Give the users good instruction is one of the key of the success of the project

For the rest it's a very nice app :) congratulation

Enjoy your code

fojanb commented 3 years ago

Hi Simone👋

Wow thank you so much! I do appreciate you for taking time and writing all of these recommendations for me🙋🏻‍♀️. Im going to fix all of these that you mentioned.

Kind regards, Fojan

On Fri, May 21, 2021 at 11:09 PM Simone Paolucci @.***> wrote:

As we talken in this issue fojanb/weather-app#1 https://github.com/fojanb/weather-app/issues/1 I try the use of .env file

For test the correct use I simply proceeded with this verification:

  1. I have create the file .env with the variable you have used in the app with some value
  2. I have put some console.log for show the value
  3. I have run (or re-run) the npm start and I see that the value is that I have put in .env file
  4. I have create .env.local with the different values and I ave re-run the npm start and I see the values is the new ones

You have correct implement the .env file feature :) well done

I suggest you some other small improvements:

-

Rename actual Readme.md, and link it in the primary Readme.md (major people know how using React Create App)

Rename Readme-1.md in Readme.md and make it the primary Readme.md with specific info of this project

In Readme.md write some info about:

  1. how use the project
  2. how retrieve the api key of the web api
  3. how use the .env (and .env.local) file (mainly to explain which variables are used and what values to indicate)

Give the users good instruction is one of the key of the success of the project

  • Create a file .env with placeholder text (something like this)

REACT_APP_API_ID=%YOUR_API_ID% REACT_APP_API_KEY=%YOUR_API_KEY%

-

remove from .gitignore the .env rules

use a .env.local file for your project

When no data is retrieve no message is display. Add a message for user

There are some warning about unused variable and unique key to resolve

const Recipe = (props) You can use the destructure for a better code, something like this

const Recipe = ({ ingredients, calories, image, title})

It's more readable when you use the variable instead of props.ingredients and you avoid to test the undefined props variable before using your properties

For the rest it's a very nice app :) congratulation

Enjoy your code

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fojanb/Foodie-Friday/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQAPHPJTKEVXH6FZNSEYW3TO5DAFANCNFSM45KKCJIQ .