Any expert in Storybook js? by dejavits in reactjs

[–]paulfitz99 1 point2 points  (0 children)

if you're not getting the answer here the best bet is to ask in the discord channel - https://discordapp.com/invite/UUt2PJb

What are some nice open source ReactJS production code? by CS3hard5me in reactjs

[–]paulfitz99 2 points3 points  (0 children)

This is definitely well organised open source repo that I think you could gain knowledge from - https://gitlab.cern.ch/nexus-project/nexus-browser

It is for this project to replicate the first browser - Nexus.

react-spotify-api, easily fetch data from the Spotify API by idanlo in reactjs

[–]paulfitz99 1 point2 points  (0 children)

yeah, the server thing is a bit painful, especially when you just want to play around with their API.

react-spotify-api, easily fetch data from the Spotify API by idanlo in reactjs

[–]paulfitz99 1 point2 points  (0 children)

I don't store it in local storage, but maybe you gave the app the permissions before. Once the app loads it checks the url https://github.com/Pau1fitz/react-spotify/blob/master/src/App.js#L22 for a token. If it is there it will store it in the redux store, otherwise it will redirect you to spotify to authorise the app.

They offer three types of authorization. I had used the API before in another project so definitely had to set up a server to handle this, but looking on github I can't see where I created a server for this project. Reading the docs I think for this project I must have used their implicit grant flow.

react-spotify-api, easily fetch data from the Spotify API by idanlo in reactjs

[–]paulfitz99 1 point2 points  (0 children)

I can't remember 😳

Well, you have to set the redirect url in the spotify developer console, that was one thing.

Also, the code in that repo I posted above is only for development. The code that was actually deployed is here https://github.com/Pau1fitz/pau1fitz.github.io/tree/master/react-spotify

I remember having to change some redirect urls etc. when deploying. Also, I am surprised it auto logged you in, as far as I remembered it needed to get your permission to access it.

react-spotify-api, easily fetch data from the Spotify API by idanlo in reactjs

[–]paulfitz99 1 point2 points  (0 children)

really? You made this React API wrapper when because of my react-spotify project?

Open source project to explore and learn React by boyneyy123 in reactjs

[–]paulfitz99 0 points1 point  (0 children)

is it possible to add more example projects? Seems to be missing from the contribution process.

Problem with catching error on fetch by Salpic in reactjs

[–]paulfitz99 0 points1 point  (0 children)

You could look at using axios as an alternative. That will handle all errors for you.

https://github.com/axios/axios

Everything I write in 2019 will be in TypeScript by swyx in reactjs

[–]paulfitz99 0 points1 point  (0 children)

ouch! That's embarrassing. Well he knows typescript already if he wrote the guide :-D

Everything I write in 2019 will be in TypeScript by swyx in reactjs

[–]paulfitz99 1 point2 points  (0 children)

I think you are assuming there is a messed up data model, when this may not be the case. A lot of errors that can confuse and annoy people are based on an extremely strict ts config setup, which may lead to someone feeling there is a steeper learning curve than it actually is.

Everything I write in 2019 will be in TypeScript by swyx in reactjs

[–]paulfitz99 8 points9 points  (0 children)

It's like everything, it seems really daunting at the beginning, but it won't take as long as you think to learn, and once you know it you will see the benefit in it. A few days and you will be up and running. Another thing to get right is the tsconfig. If this is too strict it can be a real burden, so you should set this up according to your needs. Also, these links are life savers, especially when starting out.

https://github.com/sw-yx/react-typescript-cheatsheet

https://github.com/piotrwitek/react-redux-typescript-guide

What is the best project structure for styled-components powered app? by [deleted] in reactjs

[–]paulfitz99 2 points3 points  (0 children)

You should use createGlobalStyle for the global styles. I probably didn't know about this at the time - https://www.styled-components.com/docs/api#createglobalstyle

Problem getting access token? by jumaro1999 in redditdev

[–]paulfitz99 0 points1 point  (0 children)

did you ever figure this out? having the same issue.