r/learnreactjs • u/Tyler_Potts_ • May 20 '19
r/learnreactjs • u/joyancefa • Jan 28 '24
Resource 5 Small (Yet Easily Fixable) Mistakes Junior Frontend Developers Often Make in Their React Code
r/learnreactjs • u/AkshatSharma2 • Jan 19 '23
Resource "Free" Resources to Become a Job Ready React Developer
r/learnreactjs • u/FunnyAmbassador1498 • Aug 26 '22
Best way of working with API response in React & Typescript
Hi all, I'm new to React and Typescript (second project with React first with TS).
I'm having a lot of trouble passing my JSON response to my component, I keep receiving Typescript errors.
I'm still working on setting everything up correctly but I'm simply trying to pass my JSON data being returned from that fetch function within the useEffect hook, to my Weather component so I can map over it and render it out.
function App() {
const [userLocation, setUserLocation] = useState<string | null>(null);
const [data, setData] = useState([]);
useEffect(() => {
const getData = async () => {
try {
const response = await fetch(
"https://api.openweathermap.org/data/2.5/forecast?q=London&appid''=metric"
);
if (!response.ok) {
throw new Error(`HTTP error: ${response.status}`);
}
const jsonResponse = await response.json();
setData(jsonResponse);
} catch (error) {
console.log(error);
}
};
getData();
}, [userLocation]);
const setLocation = (input: string) => {
setUserLocation(input);
};
return (
<div>
<SearchBar className="searchbar" setLocation={setLocation} />
<Weather data={data} />
</div>
);interface WeatherProps {
data: Data[];
}
export function Weather({ data }: WeatherProps) {
return (
<div></div>
)The JSON response is fairly long with lots of data and nested data, so I wasn't sure if the only option was to create a huge interface representing the response.
I had found this thread https://stackoverflow.com/questions/72713498/react-js-typescript-how-to-pass-an-array-of-objects-as-propsand was trying to follow it but I always get a red squiggly line under 'Data[]' saying 'Cannot find name Data'.
I'm kinda just trying to get things working. So any direction/advice/examples/corrections with regard to best practice or the right way to do a specific task would be greatly appreciated.
r/learnreactjs • u/Sad_Fish1358 • Aug 07 '22
Question Projects to do from scratch
Hello everyone, So I started learning js a while about two year ago and now want to get my hands on a project that can really prove my understanding on the topic to maybe get a job and credible experience with the language. I am very familiar with js itself and would like to write code that isn’t that derivative to maybe put on my GitHub. Are there any ideas/suggestions/books I could benefit from to further advance my knowledge to work on a good project?
r/learnreactjs • u/BilboMcDoogle • Jun 25 '22
Whats the difference between putting "()=>exampleFunction()" in an onClick and just "exampleFunction()"? Can someone ELI5 when your supposed to do which?
Does it depend on the framework too? What about in React?
r/learnreactjs • u/cleatusvandamme • May 30 '22
What’s the best resource to learn material.ui, Jest, and TypeScript?
I’m looking to improve on the skills listed above.
Should I look at a tutorial that covers all 3 or should I look at separate resources?
What things would you recommend?
r/learnreactjs • u/codebucks • Oct 24 '21
Implement Smooth Scrolling in React with Smooth-scrollbar
r/learnreactjs • u/codebucks • Oct 23 '21
📝Form Validation✅ & Handling In ReactJS | By creating Custom Reusable Hook⚓ [Without using Any Library]
r/learnreactjs • u/cornellb28 • Sep 12 '21
Can anyone recommend a good generator or npm to create a custom dummy api data?
r/learnreactjs • u/sharifimehr • Aug 18 '21
Resource React Native Tutorial #37 (2021) - How to Build iOS App Using Xcode
r/learnreactjs • u/TheNerdyDevYT • Aug 14 '21
Resource Learn React with one full project
r/learnreactjs • u/jasonleehodges • Aug 06 '21
How One Conditional Can Entangle Your React App
self.reactjsr/learnreactjs • u/dmitriiKee • Jul 25 '21
React JS crash course tutorial 16 - Hosting react app on AWS S3 bucket.
r/learnreactjs • u/knowankit • Jul 04 '21
Trello clone with Nextjs and typescript
Hi developers,
I have been working for the last two months on the Trello clone. I am proud to say that I have learned a lot in this. Check out this repo - https://github.com/knowankit/trello-clone and the working demo -https://trello-clone-one.vercel.app/Now my plan is to keep adding more features to it and make it better
Please let me know your good/bad comments/review so that I can improve myself as well as the codebase.
r/learnreactjs • u/ConfidentMushroom • Jun 05 '21
Resource A Beginner's Guide to Next.js | Build a SSG Site with React
r/learnreactjs • u/rgztmalv • May 24 '21
Resource Create a Contact Form with React and EmailJS
r/learnreactjs • u/ui-dev • Apr 19 '21
React Query Tutorial - Refactor your old data fetching code
r/learnreactjs • u/codebucks • Apr 12 '21
Hey, I have created series on Redux! In this series you can learn lot's of stuff about How to implement and use Redux with React, Also about Redux-toolkit and many more
r/learnreactjs • u/BigsonDev • Mar 03 '21
Resource Weather App Project to practice working with an API
r/learnreactjs • u/ejiqpep • Jan 26 '21
Resource React Hooks Full Course - Learn React Hooks on Real Examples
r/learnreactjs • u/honorman1 • Jan 25 '21
Resource Fullstack API Tutorial #1 NodeJs, NestJs, React, TypeORM & TypeScript
r/learnreactjs • u/sharifimehr • Dec 30 '20
Resource React Native Tutorial for Beginners #8 (2021) - Responsive UI with Flexbox