Horoscope not displaying from React Horoscope app?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/CodingHelp

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • talent.io - Download talent.io’s Tech Salary Report
  • aztro

    The Astrology API 💫 Get daily horoscope!

    const [sunSign, setSunSign]=useState(''); /* My sunSign state variable is set to an empty value because this value depends on what the user chooses so I didn't want there to be a set value. */ const [sunSignData, setSunSignData]=useState(null) const [loading, setLoading]=useState(false); /* My loading state variable is initialized to false so I could toggle between states by passing boolean value. False loading will hold the current value of the state and setLoading will let me change it */ // const [link, setLinkView]=useState(false); const [displayCard, setDisplayCard]=useState(false); const [reading, getReading]=useState(false); useEffect(() => { setLoading(true); const url = `https://aztro.sameerkumar.website/?sign=${sunSign}&day=today`; fetch(url, { method: 'POST' }) .then((res) => res.json()) .then((data) => setSunSignData(data)) .then(() => setLoading(false)); }, [sunSign]); const handleSelection = (event) => { setSunSign(event.target.value); } if (loading === true) { return '...Loading, wait one moment, please.'; } // const handleSelection = (event) => { // setSunSign(event.target.value); // } return ( SELECT YOUR SIGN Capricorn Aquarius Pisces Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius ) }

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts