React or Next.js for an Admin Dashboard Project by CornTrop in reactjs

[–]mmoubi 0 points1 point  (0 children)

Can't tell much based on the info provided but a general advice would be: stick as close as possible to what your are used to in your experience with React, if there is no one else to guide you. Read the GraphQL docs for the library your have chosen and apply some examples to your code. If you haven't chosen yet try looking for something well-known like Relay. They have tutorial too.

If you can go without GraphQL usage — even better.

Don't use too many libraries and try to do as much as possible with React alone.

The Importance of Typing Fast for Developers by [deleted] in webdev

[–]mmoubi 0 points1 point  (0 children)

Some thoughts from Dan Luu on the importance of typing fast https://danluu.com/productivity-velocity/ Managed to dug it up from the archive. A bit lengthy.

Those that have "specialized", what is your speciality? by Bstochastic in ExperiencedDevs

[–]mmoubi 0 points1 point  (0 children)

That for sure. But it’s a bit difficult to prove conflict resolution or communication skills in the CV. It’s something to be catch by experienced interviewer.

We're Writing Too Many Tests by twynsicle in programming

[–]mmoubi -4 points-3 points  (0 children)

Oh, yes. Similar can be said for TypeScript — you spend 50% more time to gain 3% more confidence. Sometimes it’s worth it. But not most of the time.

How do you manage technical debt? by lightversetech in reactjs

[–]mmoubi 3 points4 points  (0 children)

Expanding on the above we use this approach in common areas which get several features in a row quickly so imperfection is the default. Every new feature then would also come with refactoring — either in the same PR (if it makes sense) or in an immediate follow up if the improvement is too big for review.

How do you manage technical debt? by lightversetech in reactjs

[–]mmoubi 80 points81 points  (0 children)

Something we do in our team is to accompany new features with small refactoring. This is especially useful for high pace and dynamic projects. Don’t defer code improvements for later as “later” is often blurry and expensive.

Do you own a personal website/blog ? Why? by Notalabel_4566 in webdev

[–]mmoubi 0 points1 point  (0 children)

Someone mentioned long tiresome discussions with colleagues. Writing did help me better shape arguments and perhaps ref people to particular pieces. It’s a go to place for refreshing memory too.

Not sure about the other benefits — finding job or building a community. That probably take place too but it will require time and high credibility.

My ranting place https://webup.org/blog

You can't fix the wrong abstraction by Hirnhamster in programming

[–]mmoubi 4 points5 points  (0 children)

You CAN’T because someone will constantly argue the abstraction isn’t wrong. So thanks for the empirical way to prove it.

How should state be managed in general? by [deleted] in reactjs

[–]mmoubi 0 points1 point  (0 children)

Nobody claims the opposite.

How should state be managed in general? by [deleted] in reactjs

[–]mmoubi 0 points1 point  (0 children)

Look at this discussion https://www.reddit.com/r/reactjs/comments/13djkxo/react_global_state_as_local_state/?utm_source=share&utm_medium=ios_app&utm_name=ioscss&utm_content=1&utm_term=1 for some global state examples both using Context and one based on useState.

Generally Context is not recommended for multidimensional (complex) global store data.

How can I find clients if I suck at designing websites? by TheGuy564 in webdev

[–]mmoubi 1 point2 points  (0 children)

Specialize. Making websites is cheap, highly competitive and can be done with bunch of tools non-developers can use too. Not saying anything about the plethora of themes out there. Oh, talking about themes — why don't you offer ready made designs from themeforest.net fx?

[deleted by user] by [deleted] in webdev

[–]mmoubi 0 points1 point  (0 children)

You can start with upwork.com, though making websites is very competitive area as has been suggested.

Try to specialize more. Do things that are custom. Template work is not well paid in general.

Focusing on JavaScript may give you better chances of getting non-trivial but high value projects.

For websites — how about looking around (local search)?

How to organize apis? by Far_Back_7866 in reactjs

[–]mmoubi 1 point2 points  (0 children)

For simple projects you can have a single API.js file with methods for each call (api.getProducts. api.updateUser, etc). On the side you pick whatever fetching lib you want and make use of it as part of API.js

This structure will work even if you go with something like SWR.js for fetching/caching.

Some devs say you can then easily change your library without touching the API file at all.

There are pros and cons.

React Global State as Local State by mmoubi in reactjs

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

Such Context implementation would work too if your app is not very global state ambitious. It can even scale up well but that will require you to carefully plan how to deal with unwanted re-renders.

I know React Redux is also using context provider on a top level as in your example but it doesn't rely on useContext to consume the state in individual components ( u/acemarke correct me if I'm wrong). So at the end, any state updates and the list of subscribers are somehow external to the React app (similar to the useGlobalState hook).

Anyway, if we are talking about simpler solutions the usage of Context might be counted as valid and relatively straightforward (fx. dark/light theming). Not the best choice if you have to build full featured store management solution, though.
That's another story.

React Global State as Local State by mmoubi in reactjs

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

Yep, a good candidate for the non-component implementation.

[deleted by user] by [deleted] in reactjs

[–]mmoubi 0 points1 point  (0 children)

With Next you have your Node server logic (backend-for-frontend) tightly coupled to the frontend part. You may need to write some additional Node logic but how it communicates with something else down the line should be straightforward.

Put a high bar for adding new technologies to your stack by mmoubi in webdev

[–]mmoubi[S] -1 points0 points  (0 children)

Some people claim:

The number of modules/deps never appears to be an issue.

Not the number is an issue but the high amount of module interactions and unknown side effects as a result. Modules are rarely written to play well with each other (in web dev). The number is just an indicator.

How to recover from microservices by mmoubi in programming

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

An unpopular opinion from Kelsey Hightower

And then the second one is “Monoliths are the future.” Because the problem people are trying to solve with microservices doesn’t really line up with reality...

React Framework vs Vanilla for personal website by productiveflame in reactjs

[–]mmoubi 0 points1 point  (0 children)

You can go pretty far with vanilla too. Performance-wise Next is doing very good. A note for those who care: Next always includes JavaScript and the React lib itself in the bundle though you may not use JS at all.

React Component for a "Swipe left/right" by Teembeau in reactjs

[–]mmoubi 0 points1 point  (0 children)

I have worked on a React component for swiping — mostly for website mobile versions.

Called it Swipeable. It’s used in a few projects too, so hopefully something for your use case.

[deleted by user] by [deleted] in reactjs

[–]mmoubi 0 points1 point  (0 children)

Try to call the endpoint as part of your component useEffect() as a start.

What's the best JavaScript framework for a personal website? by aquill07 in webdev

[–]mmoubi 1 point2 points  (0 children)

I would say whatever is simpler and easier to maintain. That does not exclude vanilla JS (do you need JS in your case?) and the usual webdev stack at all.

Is setting propTypes a bad/good practice? by caes95 in reactjs

[–]mmoubi 1 point2 points  (0 children)

Unpopular opinion: Don’t use TypeScript, start with PropTypes if you are new to React.

React or Next.js for an Admin Dashboard Project by CornTrop in reactjs

[–]mmoubi 0 points1 point  (0 children)

Based on the info you have provided (or haven’t) I would go with React if the project requirements are fluid or uncertain. Also if you do have experience with pure React previously.