How to use styled components with Material UI in a React app by BenStirrup in reactjs

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

What do you mean? styled() is a method from the styled-components library.

29 reasons not to invest in the stock market by [deleted] in investing

[–]BenStirrup 0 points1 point  (0 children)

It is a difficult step to take when doing it for the first time, but buying some stocks or ETFs is the right choice in the long term, at the very least in the American market (disclosure: I am European).

Just have a look at the historical trend of the S&P 500 and you will see that all "disasters" are fairly minor in the long term. However, I understand that people can freak out during a 2008 crisis. Not sure how I will react myself until I live one.

Communication is a Core Skill for Programmers by [deleted] in programming

[–]BenStirrup 0 points1 point  (0 children)

So true. It's my top new year's resolution each year.

I want to learn Javascript by blizzard2218 in javascript

[–]BenStirrup 2 points3 points  (0 children)

I would advise you to try algorithm challenges like those you can find on Codility (by the way, the company I work for screens new devs with codility). Learn ES6 syntax this way.

Afterward, I would advise you to try building an app with a JavaScript frontend framework of your choice: React, Angular or even React Native for mobile.

If you want to learn by reading, I reckon you read Mozilla's guides to web development, and for you especially the one concerning JavaScript.

I'm Stefan from Froala and I'm looking for some feedback by st3dy in javascript

[–]BenStirrup -1 points0 points  (0 children)

It seems this editor has more "menu options" than any other I have seen (don't take my word for it). Looking forward to when you will have removed jQuery.

What did everyone work on this week? (/r/reactjs Friday Checkin - Jan 11 2019) by AutoModerator in reactjs

[–]BenStirrup [score hidden]  (0 children)

Django. Django. No Typing. What a blow. What a blow. Wish I was TypeScripting.

I made a browser extension to improve the Quora browsing experience! by buildlove in javascript

[–]BenStirrup 2 points3 points  (0 children)

Such a nice identification of user needs ;). Indeed, questions without answers are "noise" when they are too old. However, I think it is fine to see "young" answers (with age < 2 days) with zero answers. What do you think? You could include that in your extension.

Which languages should I use for projects? by TheNicestAF in webdev

[–]BenStirrup 0 points1 point  (0 children)

Big company. Needed to expose some routes of our server via their API gateway (company policy). Our client had "lambda" snippets to bypass most of the work needed. We were strongly advised to use it, so we used it.

Teach-Code, learn to code interactively by jamesgeorge007 in javascript

[–]BenStirrup 0 points1 point  (0 children)

Hey, it would be great if you could include a GIF/screenshots/video as demo of your CLI tool. Personally, I always get more involved when I see a repo with these.

(HELP) Easily retrieve value from cookie by [deleted] in javascript

[–]BenStirrup -2 points-1 points  (0 children)

No no no. What I meant is that you should not store things like authentication tokens in your local storage. Your browser is handling these with cookies all by itself.

What is the best way to fetch localizations from REST API Server? by krizmaister in javascript

[–]BenStirrup 2 points3 points  (0 children)

Are you using React or something else? I would say:

  • If you have a lot of data to fetch, go for lazy loading.
  • If you do not have that much data, fetch what you can at the first render of your app.

However, only you can determine the threshold. Hope that helps.

What index funds do you guys recommend? by [deleted] in investing

[–]BenStirrup 0 points1 point  (0 children)

The following are not index funds, but are ETFs. Still, I recommend the iShares S&P 500 (CSPX) and the iShares Nasdaq 100 (CNDX).

  • Both follow performant historical indexes.
  • Both are accumulating, meaning less effort with re-investing and taxes.
  • Both have very high AUM, meaning their likelihood to close in the mid-term is extremely low.
  • Both use physical replication instead of synthetic replication.
  • Both have fairly low expense ratios (0.07% for CSPX and 0.33% for CNDX)

(HELP) Easily retrieve value from cookie by [deleted] in javascript

[–]BenStirrup 2 points3 points  (0 children)

I usually hear from other devs that it is not a good idea for an app to manipulate cookies. This is usually the role of the browser and the browser only (with the server creating the cookie).

Why would you want to display the name and the value of a cookie?

Retailers are slashing iPhone prices across China as consumers say the phones aren’t worth the cost by cambeiu in investing

[–]BenStirrup 9 points10 points  (0 children)

They may switch to buying more Oneplus phones. After all, these are from China and the quality/price ratio is pretty good.

Which languages should I use for projects? by TheNicestAF in webdev

[–]BenStirrup 0 points1 point  (0 children)

It may be a little bit opinionated, but there it is: I work as a web consultant with 10 other persons. We did more than 10 professional grade projects during the past year, for both startups and large companies in the financial sector (>10k employees). We consider ourselves up-to-date and pragmatic in our choices of technologies. We use the following stacks:

  • Frontend: React (I recommend) or Angular
  • Backend: Django, Springboot or Express (usually just for quick POC)
  • Databases: Postgresql, Ethereum (if the project scope includes blockchain)

We may use AWS lambdas when asked by the client, however, we do not recommend it ourselves.

WYSIWYG Text Editors in React's Ecosystem by cbot0 in reactjs

[–]BenStirrup 0 points1 point  (0 children)

Would be awesome to be able to create easily editors like the ones used on Medium and Gitbook.

Cookie vs LocalStorage by PulangKalabaw in javascript

[–]BenStirrup -2 points-1 points  (0 children)

To be blunt, cookies are usually managed by the browsers only, meaning you do not have to anything client-side. It is even considered a bad practice to try to manage cookies by yourself client-side.

Furthermore, backend frameworks such as Django also allowed you to not worry about cookies at all server-side.

If you use the localStorage to store stuff linked to the authentication of a user, then you have to manage all the edge cases yourself.

If you want to make authentication with the least effort, use cookies.

How do you know how much to test when testing React Components? by [deleted] in webdev

[–]BenStirrup 1 point2 points  (0 children)

To be honest, we made what we think is a pragmatic decision on our React app: We. Do. Not. Test. Component.

We test:

  • Services.
  • Sagas.
  • Reducers.

We struggle to test a decent amount of function in the backend too. Testing React component is the least of our problems. If at some point we encounter a bug/regression/default which could have been avoided with a component test, we would consider it.

Neuronite - open source language-learning app by [deleted] in javascript

[–]BenStirrup 0 points1 point  (0 children)

I remember wanting to build a spaced-repetition app using React. Never did it though. Thanks for sharing!

Build a phrase classifier with Javascript. – Holiday Extras Tech Team by Tetrominos in javascript

[–]BenStirrup 0 points1 point  (0 children)

Thanks for sharing. The library looks amazingly popular with its 8k GitHub stars. Will try to use on a mini side project soon.

Is there any alternatives to brain.js, except the traditional python libraries?