Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "react-router"
With all the major library/framework overhauls in the JS community, I feel we may need to start versioning in our resumes:
I posted a question concerning React (and React-Router), it's been 3mn and no one has answered yet. Is Stack Overflow broken?6
Due to popular demand (and we being unable to produce a smooth performance out of JavaFX), we decided to switch to Electron for devRantFX collab. It is now called devRantron!
Relevant collab: https://devrant.io/collabs/420025/
Under the hood we are using the following techs:
- React (ReactJS, Redux, React-Router)
- ES6 and Webpack
If you have knowledge about React-native or VueJS, you should be able to understand the code (eventually). If you want to contribute let me know! I will add you to our slack group :)12
Miss those days when web development used to be easy...
Now the react, react-router, redux, server-side-rendering, redux-form and nodejs...making me crazy.
And oh how can you forget the fucking webpack.
Someone please kill me.10
Somebody asked on how to get started on Full Stack web application development.
This is how I got started.
Client side Web Application Development:
• Start with basic HTML, CSS and JS, JSON. For quick learning, see W3Schools for these topic or YouTube it.
• Get a local web server. "200 OK!" webserver chrome extension is a good start. (https://chrome.google.com/webstore/...)
• Learn Chrome Dev Tools to debug the pages. YouTube it.
• Get a good IDE. I am very happy with VSCode. You can use it for very serious WebApps.
• Install node.js. Learn NPM package manager. Learn basic node commands.
• Learn complexity of JS file referencing, JS modules in browser. Just learn, don't use it yet, to understand the benefits of code bundlers.
• Learn Webpack code bundler.
• Learn how to make you simple site much faster and using in Mobile using "Progressive Web Apps".
• Now learn to make modular UIs. I love React. Focus on getting the UI code modulear. Create Single Page sites. (You are not there yet to create a Web App) “Create-React-App” started kit is a good starting point.
• Learn to create multi-page site using React-router.
• Learn application state management using Redux.
• Learn to create application decision engine using Redux-Saga.
Practice and master each stage.
Along above, learn git / GitHub (to learn from others code), find good web resources like Medium / Smashing magazine, good YouTube channels etc. I subscribed to some popular Udemy courses too.
Server side Web development:
:) First learn client side Web Application development. Server side learning is another story.3
OK. FUCK YOU REACT-ROUTER AND YOUR FUCKED UP "SHOULD BE STRAIGHT FORWARD" IMPOSSIBLE TO FIND DOCUMENTATION AND HALF BAKED EXAMPLES OF INCONSISTENT VERSIONS.
FUCK YOU WITH A TRUCK INSIDE YOUR BITCH ASS11
First website with React JS:
After a month of studying on React I am finally building a commercial website with it. When I started learning React with redux and react router it felt so unnecessarily complex.
But trust me guys, all it takes is patience. Once you learn it creating a Web app is a breeze. And everything eventually makes so much sense. I'm so glad that I didn't give up and if you in the same position , DON'T GIVE UP. You'll eventually realise how amazing react is.9
Creator of the react router:
If you ever see this, you created one of the greatest library with one of the worst documentation ever.
And don't get me started with versions. In every single versions, you break everything so badly and nothing works anymore.
Everytime I need to do something related to react router, I just fucking roll on the floor and cry. Documentation is fucked up.
It's totally fucked up. In the github there's one documentation, in the website there's a different. At the end, nothing works.
Please, if you want to create a nice library like this, maintain it. If you can't maintain it, mark it as deprecated and someone will take over.
But keeping something like this and making it absolutely inconsistent doesn't help. I am really tired of debugging bugs related to react-router2
Me: Oh, man, there are hooks for react-redux now? I don’t have to wrap components in a higher order component to get information from the redux store and dispatch actions? Could this solve the problem I’m having with data fetching and consistency in the app I’m working on?!
Spends entire Saturday writing a basic server, connecting to an mLab instance, filling said instance with dummy data, starting a create-react-app, writing a reducer, action creators, components, etc. just to test how useSelector(), useEffect(), and useDispatch() would work in an application that isn’t just a simple counter (why is it that like every example is always the counter example?!). Bonus, react-router now ALSO has hooks, so got to play with useHistory() and useParams()
Conclusion: Maybe. It does appeal to me to not have the cascade of virtual DOM that you always get nesting HOCs, but I’m also wary of appearing too willing to jump on it just because it’s the new thing.
Has anybody else played around with react-redux hooks? Your thoughts?
Also, yes, I know, not every app needs redux. It had it when I was brought on and I don’t really have the ability to change that implementation detail now.3
I hate react so much. I hate it with the fiery rage of an old testament god. I tried to like it. I wanted to like it.
Unfortunately I picked up Angular (2). I'm now used to a framework that has you covered for most things. That has logical methods of laying out your app. A router that's actually built in and makes sense.
I'm used to writing HTML in the templates, not some horrible abomination of XML that's pretending to be HTML and just waiting to pull off its mask and smack you across the face with its penis while telling you what an idiot you are.
React apps all seem to be cobbled together in a different way. You have to go hunting for the logical stuff you expect to be there.
Let's not even get started on the tome of dependencies it needs to get itself off the ground, all written by vastly different developers from different planets with completely different life goals.
I hate it. The more I learn about it the more I find myself yelling "WTF!" while shaking a fist at the wall, hot tears of rage steaming down my pudgy cheeks until my wife comes running into the room and consoles me with my head on her bosom.
...and I just started a project that will have to be seen through to the end, using.. react.
Seriously, fuck you react, I hope you die of herpes.11
Can't use the current version because the new version is in beta and coming soon.
Can't use the new version because it is in beta and full of bugs.
Whenever I need to make any changes related to React-Router, I just curl up in the corner of my room and cry :(
Pro-Tip: If you change your `div` to `li` and then decide to change them to `span`, check before you replace all lest you end up with `Navspannk` from ‘react-router-dom’. Why are my styles not working? Ah, they are ‘spannkStyles’ now.5
Why the fuck nobody talks about Multi-page apps?! We went from a Web where everything was Multi-page server-rendered, and now everything for Web developers is "Single-page apps".
What about websites who can't do that? Not everything can be a single-page app. Only my uncle's restaurant website, or something which is TRULY a full app. No half choices.
If your website is a multi-page app/portal which actually PRELOADS data, instead of doing 100 fetch to an API within a page that is full of loading bars, well, your life is a pain.
When you want a first contentful paint which isn't a white page, well, your life is a pain.
What are React, Vue, Ember, Angular (let's exclude Svelte and Marko) going to do about Multi-page apps and SSR?
React-router sucks to me. It's performance is weak and it's useful only when you have an SPA with multiple sections which can be treated as pages (e.g. A single SPA divided in tabs).
Server-side rendering is the worst pain ever made by humanity, in React (and prob Vue, I didn't try but I can bet). And even when made easier from libs like Svelte and Marko, I (personally) can't get it to be faster enough compared to a traditional website without a JS framework and with a templating engine.
Anyways, if there's anything that I learnt from React, is to stay away from Next.js. Perfect, beautiful, mess.
All JS frameworks just seem to bloat the code and make it worse and slower, even though they're REALLY helpful.
Why? Why everyone loves them if their downsides are so clear? Why 3 projects out of 3 I made (1 React SSR, 1 Vue, 1 Marko SSR) are and will stay painfully slow and bloated, full of shit, even if in 2020 we should have evolved with the famous three shaking, with the famous lazy loading, etc.?
I am just frustrated.
And let's not even talk about Webpack, Rollup, Lasso, those module bundlers shit which are harder to configure and understand than finding a needle in a haystack.
Lasso was the easiest to configure but I anyways can't understand it. Webpack seems it was made to handle SPAs, as any tool in this freaking world, and not even considering an easy way to integrate multiple bundles for multiple pages (I know it's pretty easy, but with component sharing between pages and big unique bundles Next.js handles it soooo bad it feels like hell).
Am I the only one?
Sorry for the long rant. I just needed to rant right now.18
How do you feel about using TypeScript with React? I appreciate the benefits, but, as every snippet of React code everywhere on the web is vanilla JS,I just don't want the cognitive overhead.
Yes, I know TS is JS, but, if I'm not going to use the features, why bother? I'd want to strongly type props, state, etc.
What's the status of TypeScript support in the React ecosystem (eg Router, MUI, etc.)?
I'm kinda hoping Reason will get some traction as the type inference is much better, but, will that happen? Or is that going to fizzle so it's a choice between TS and JS?
Appreciate any thoughts on this---including those from anyone who's in the same boat.
Looking for views on TS in React ecosystem---no need to sell me on TS in general.6
Hello, Hi! Friendly neighbourhood noob here!
What’s he stuck on today you ask? React and Firebase!
Did he try? Yes he did! Only a little hitch this time.
...It’s all relative... like the truth!
Anyway PLEASE someone look at my StackOverflow question!!
Firebase and react are awesome tbh. But I cant figure this out!
React + Redux + Router is do fucking awesome stack. Love It much more than angular 1.x. App works so fast, is scalable and easy to maintain.
Reactive paradigm for the winner!2
If your SPA doesn't work with the browsers navigation buttons . . . go fuck yourself and fix your application.
At work I have to deal with an application that manages work tickets. There's a login page, an overview console and a page for each individual ticket (and a whole bunch of other pages that I'll ignore for this rant.) If I click on a ticket to view it I go to a new page, right?
What happens if I want to go back to the overview? I hit back on my browser. That should take me back!
Nope. Because it's a single page application with no fucking routing programmed, the browser still thinks that the login page is the last page so it takes me there instead.
Like come on, good UX/UI design takes advantage of what the user expects and what the user is used to. The user expects the back button to take him back one page, and therefore it is the responsibility of a SPA developer to mimic that capability in his app. I don't know what framework this web page uses (it has none of the recognizable hallmarks of React or Angular) but for gods sake, implement a freaking router.4
Meteor team: it is not a valuable framework to me if I have to spend the time I saved with the good parts trying to piece the structure together cause "fuck it everything's agnostic". Getting a react router to work in a generic manner with my going template shouldn't require a 20 step puzzling of components. Good frameworks for me piece together complexities without creating new ones.
When you've not done anything with react-router for a while and the latest version is so very very different 😫4
It seems they mistaken me for italian giving me spaghetti all over the product. Go to frontend to check the app, react with weird jQuery, no routes, pages summoned by the templates that have concatenated values and html in vanilla js, changing screens/pages with jQuery, no router... ok lets see the other app, react, redux, offline capabilities and tought myself niicee hut nothing work as intended with clusterfuck of hacky workarounds that makes app look like it is working but with hardcoded data. Offline means automatic sync when you get the network back, right? Oh backend never developed any sync, so you guys can do it, we have to fix and patch some important stuff! I don't like php but whatever, let's see what is going on there... So much spaghetti bolognese there that Bologna actually called to ask if they can buy some, they are out of stock because of us!
This is just like that song mess.css from stdout, but in any file you open!
Living on deserted island eating grass and coconut for the rest of the life doesn't seem so bad atm!4
So been doing a freelance project for the past week, small backend API with a front-end, thought I'll give react.js a shot and actually learn it (know a bit of the basics) so using MERN including tailwindcss.
Built the API in a few days, quick and easy. Down to react, not going to lie. Once you dive into it, it's really nice to use. Just tackled a contact form and a few dynamic pages using props, state etc today. Now onto the rest of the site including the the Dashboard to CRUD records.
Still have a lot to learn. But given what I've learned so far. Don't see it taking too much longer.
Famous last words though 😅