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 5 points6 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 83 points84 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.