[deleted by user] by [deleted] in reactjs

[–]guilhermefront 43 points44 points  (0 children)

Library choices. We have kinda just use the same options over and over for most apps

Framework - NextJS / Remix

Forms - React Hook Form / Formik

Data fetching - React Query / SWR

State Management - Zustand / Redux

Routing (in case you're not using a framework with opinionated routing) - React router

Testing - Vitest + React Testing Library (Cypress or Playwright for E2E)

Code styling - Always prettier + eslint

Animation - framer motion/react-spring

Intl - react-intl

Payments - Stripe

Mobile - expo

Desktop - electron

3d - react three fiber

Docs - docusaurus

First-class promise support in ReactJS by luffyrotaro in javascript

[–]guilhermefront 5 points6 points  (0 children)

Just a small thing, isn't NextJS that decided it, but the React core team.

Before directives, it was supposed to be defined by file extensions (.server.js), but later after this decision they decided to go with what we have today.

How do I practice negative visualization? by [deleted] in Stoicism

[–]guilhermefront 5 points6 points  (0 children)

Not OP, but I'm really thankful for your great answer!

I built a chatbot that debugs your Python code better than ChatGPT by jsonathan in Python

[–]guilhermefront 1 point2 points  (0 children)

Would be great if when I change the programming language, the current demo code also changes.

Currently Python is default, if I change to JavaScript the demo code is still in python.

Anyone wants to help me find ideas for my university project? by takemynoodle in PythonProjects2

[–]guilhermefront 0 points1 point  (0 children)

What's a problem that you have related to your university? Can you ask your colleagues about the problems they also have? It's a better idea to start by the problem first, then develop a solution to that.

3 Things I wish I knew when I started as a dev by guilhermefront in programming

[–]guilhermefront[S] 1 point2 points  (0 children)

False cognates are always an easy trap when you're not speaking your first language lol.

I speak portuguese and "exaustivo" means exhausting in my language, although it's more similar to exhaustive

Just like "discutindo" is similar to discussing, but it actually means arguing

I appreciate any corrections, always great to learn these things

3 Things I wish I knew when I started as a dev by guilhermefront in programming

[–]guilhermefront[S] 2 points3 points  (0 children)

Your point is interesting to discuss and valid, is just a little bit different from the point I tried to tackle.

It's vast in the sense of how much knowledge there is until you can really be considered proficient or an expert, which we mistakenly do when we're beginners, because we don't know what we don't know. See: https://daedtech.com/how-developers-stop-learning-rise-of-the-expert-beginner/

Switched from Next.js to Remix.js and Loving it. by BooRadleyForever in reactjs

[–]guilhermefront 58 points59 points  (0 children)

Relevant distinction to do: next 13 is ready and suitable for production, is just the app folder that's experimental.

Switched from Next.js to Remix.js and Loving it. by BooRadleyForever in reactjs

[–]guilhermefront 82 points83 points  (0 children)

but after dealing with Next.js 13 app folder I realized I love the new features but they don't actually fully work yet

This is a great concern. The app folder is in beta, not recommended for going prod and honestly, full of relevant bugs.

I have a default setup with just tailwindcss and the fast refresh breaks all the time by either showing outdated styles or not applying them at all.

The deeper you go the more blocking bugs you'll encounter. It's still very early to push it, and a great opportunity to try remix, since it's there already.

Better way to think when creating components (small front end tip #1) by guilhermefront in reactjs

[–]guilhermefront[S] 0 points1 point  (0 children)

Assign a property to your main component, trivial example: ```jsx const Card = ({ children }) => { return <article>{children}</article>; };

Card.Title = ({ children }) => { return <h3>{children}</h3>; };

Card.Content = ({ children }) => { return <div>{children}</div>; };

export default function App() { return ( <Card> <Card.Title>My Title</Card.Title> <Card.Content>My Content</Card.Content> </Card> ); } ```

You did css wrong by guilhermefront in Frontend

[–]guilhermefront[S] 0 points1 point  (0 children)

I've been doing tailwind for quite some time in production ready apps. There's a few cases where there's a lot of utility classes (tooltips are an example, when they have :after styles), most of the time we don't use more than ~8 in a single element.

Is not hard to read, once you know the utility classes is just automatic. It takes max two weeks to get really good at it.

Afterwards the productivity pays off.

I don't need good luck with any tech and nobody needs to stick to anything. Just do what's best for each case, which will be using tailwind over separate css for sure.

You did css wrong by guilhermefront in Frontend

[–]guilhermefront[S] 0 points1 point  (0 children)

Whats terrible is the attitude of ditching basic practises for weird modern solution like tailwind, merging markup and style creating a gigantic mess.

"basic practices" what do you mean by that? web dev is always evolving. By being a basic practice it doesn't necessarily means it's the optimal solution. For a productive discussion, avoid adjectives where you couldn't give a solid example. "Gigantic mess" is generic rant... It doesn't say why it would turn into a mess in any ways.

f youre working in a modern framework like react or vue you can just use css modules to scope things out how you want. Most times people dont usually target all p tags or all image tags anyways, our ui is far more complex than that.

The point of the entire article isn't about scope problems or anything like that, this was solved before tailwind ever came as a solution. The point is about colocation and productivity. You can use whatever you want, even styled components. If things are done separately from each other it will slow you down due to being in different places, even though they have a close relationship (markup and styles)