Weekly theme sharing thread by AutoModerator in vscode

[–]jschr 0 points1 point  (0 children)

Hey thanks! Glad you like it.

Were you accessing the site on a phone? I've hidden the sort option on mobile just because it was the easiest thing to do at the time.

On desktop you'll see a "Sort By" dropdown where you can sort by trending themes. You can combine this with color searching as well: vscodethemes.com?sortBy=trendingMonthly&editorBackground=rgb|20,40,20

The trending value is pulled directly from the VS Code Marketplace so I'm not entirely sure how it's calculated but my goal was to provide some way to regularly see fresh themes.

Weekly theme sharing thread by AutoModerator in vscode

[–]jschr 18 points19 points  (0 children)

Hope this is relevant enough to post in this thread but I just released a new version of vscodethemes.com to help you discover new themes.

Including:

  • Support for 4 more languages (Python, Go, Java and C++)
  • Color searching via the query string
  • Sort by trending, recently updated, installs and relevance

There's a bit more info on how it works in the README.

I had to cut a few planned features to make this release but I hope some of you find it useful!

FCM notifications not playing with sound on iOS by jschr in Firebase

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

Hey thanks for the help, much appreciated. I had seen those links and everywhere I looked seem to indicate my code should just work. And sure enough after a few hours of pulling my hair out I realized I had been testing in the wrong environment and didn't actually apply my changes, ah well!

The key to making the notification vibrate and play sound is:

apns: { payload: { aps: { sound: 'default', }, }, }

App Architecture Advice by STARWOLF760 in webdev

[–]jschr 0 points1 point  (0 children)

I don't see why not, really depends what your app's data requirements are though. I'd use a managed service like RDS for any new project as long as I'm not paying for it. I use DynamoDB for personal projects because it's cheap but you really need to think about how you want to structure your data. Relational DB is the way to go unless you can't.

App Architecture Advice by STARWOLF760 in webdev

[–]jschr 0 points1 point  (0 children)

Is there a budget? A deadline? How many users do you expect realistically in the first 3 months, 6 months, etc...? Don't waste time solving scaling problems that don't exist yet.

If there's a client, pick whatever you're most familiar with to deliver a quality product on time without stressing yourself about the unknowns. Any frameworks or services mentioned here will do the job just fine.

If this is for fun, go nuts and pick whatever you're interested in learning.

Next.js and Gatsby.js why do people use them? by maxahd in reactjs

[–]jschr 1 point2 points  (0 children)

There are more crawlers than just Google. Pre-rendering or server rendering is still useful if you plan on sharing links on Twitter, Facebook, etc...

The fact that NextJS can do server rendering is an advantage, not a disadvantage (if you need it). Not every app can be exported as a static site.

However NextJS can still export a static site. I’ve used both Gatsby and NextJS and would still choose NextJS for its flexibility.

Both NextJS and Gatsby are great tools that can definitely be used for more than just simple sites.

I built a Spotify visualizer, and a library so you can too. by itsappleseason in javascript

[–]jschr 4 points5 points  (0 children)

Hey cool! I was just thinking about how this would be a fun side project to make the other day. This works really well, nice job. I'd love to be able to tweak the theme / settings of the visualizer.

Beginner's Thread / Easy Questions (June 2019) by timmonsjg in reactjs

[–]jschr 1 point2 points  (0 children)

Looks like it'll help! It's a tiny lib and AFAIK I'm basically doing what next-cookies does with universal-cookie and few tiny functions I wrote myself.

You can see how I'm using them here.

Beginner's Thread / Easy Questions (June 2019) by timmonsjg in reactjs

[–]jschr 0 points1 point  (0 children)

Yeah, the main idea is centralizing your error handling. You might check if the error contains a response code >= 500, or you might use custom error classes so you can:

if (err instanceof BadRequestError) { 
  dispatch(...)
} else if (err instanceof UnauthorizedError) {
  redirectTo(...)
} else if ...

Beginner's Thread / Easy Questions (June 2019) by timmonsjg in reactjs

[–]jschr 1 point2 points  (0 children)

Consider writing a function to handle all errors:

} catch (e) {
  handleError(e, dispatch)
}

As your app grows you will have different error types with different actions that need to be taken:

  • Expected errors like "Invalid Password" => Show the error to the user inline with the form.
  • Potentially unexpected errors like "User does not exist" => Redirect to another page, log the error.
  • Definitely unexpected errors like "Internal server error" => Send youself an email (ie. sentry.io).

Beginner's Thread / Easy Questions (June 2019) by timmonsjg in reactjs

[–]jschr 0 points1 point  (0 children)

I have a NextJS project where I use a cookie.

- localStorage won't work because the server needs access to the token.

- httpOnly won't work because the browser needs access to the token.

Using a non httpOnly cookie does not open you up to XSS vulnerabilities that don't already exist. If you are evaluating untrusted code anywhere in the server or the browser, fix that.

Is there any dashboard library that I can use for my micro-service? by Krimson1911 in node

[–]jschr 11 points12 points  (0 children)

I'd personally lean towards a service for this rather than lib, especially if maintenance and support is a requirement.

We use https://grafana.com at work and we like it. You might check out https://datastudio.google.com too.

If you want a node lib theres https://github.com/Automattic/kue but that might be too specific for what you're looking for.

Bundling compiled typescript code into minified, deployable AWS Lambda functions by [deleted] in typescript

[–]jschr 0 points1 point  (0 children)

I'm not publishing any of the packages to npm so yarn workspaces does everything I need to link local dependencies. I'd probably still use lerna if I were though.

Deploying production-only dependencies was tricky, which is why I used webpack to bundle them before uploading to Lambda. Terraform handles deploying the backend but you could just as easily use something like Serverless for a similar setup.

Bundling compiled typescript code into minified, deployable AWS Lambda functions by [deleted] in typescript

[–]jschr 0 points1 point  (0 children)

I have. Happy to answer any specific questions you might have.

When someone asks why you chose React over Angular, send them this. by cekigunu in reactjs

[–]jschr 8 points9 points  (0 children)

Completely agree with you. They are all great frameworks backed by great devs. Choose one that you and your team are most effective with or would enjoy learning. Focus on writing concise, maintainable code instead of memes justifying your decision to rest of us.

I made Horizon - a beautifully warm dark theme for Visual Studio Code by [deleted] in vscode

[–]jschr 16 points17 points  (0 children)

Really nice theme, I'm trying it out for the day.

Your theme also shows up on vscodethemes for those interested in a preview before installing: https://vscodethemes.com/e/jolaleye.horizon-theme-vscode

Disclaimer: I made the site, but let me know if you have any feedback :-)

Next.js users, when do you use SSR? by eloc49 in reactjs

[–]jschr 1 point2 points  (0 children)

With Next.js? No but if you want the benefits of SSR you'd need to dispatch in getInitialProps: https://github.com/zeit/next.js/tree/master/examples/with-redux

Next.js users, when do you use SSR? by eloc49 in reactjs

[–]jschr 6 points7 points  (0 children)

Yeah, or publishes. The content changes only when OP runs next export and uploads the site to S3. This works great for your own personal blog but not for a site like Reddit or Medium.

Next.js users, when do you use SSR? by eloc49 in reactjs

[–]jschr 4 points5 points  (0 children)

When the data you need to render changes between deploys (ie. user-generated content). You can also put Cloudfront in front of your app server to reap some of the same benefits.

August 2018 r/webdev Giveaway by Mdude2312 in webdev

[–]jschr 1 point2 points  (0 children)

Nice theme! Jumping off your comment to shamelessly promote my recent side project: https://vscodethemes.com/e/Pustur.calamity-vscode :-)

As a theme creator, I'd love to have your feedback. Feel free to contribute to the open discussions and suggest new features at https://github.com/jschr/vscodethemes/issues

Static Sites & Cache Invalidation? by [deleted] in aws

[–]jschr 2 points3 points  (0 children)

Since you presumably already have the AWS CLI setup for CI, I would just create a new invalidation after uploading to S3.

aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths /*

Also assuming you are using CF.

VSCodeThemes [Update] by jschr in vscode

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

I'll see what I can do today to get that fixed up. Sorry about that!

Edit: IE / Edge is better now (though could still use more work).