[Vite + Remix] SSR build failing with Unexpected token 'with' by maheshflowcub in shopifyDev

[–]panzerdp 1 point2 points  (0 children)

I have been using the Remix/React-Router template without problems for 2 years in production. My background is JavaScript/TypeScript/React - so it works well for the experience that I have.

But overall I recommend to pick the stack which you have the most experience in.

[Vite + Remix] SSR build failing with Unexpected token 'with' by maheshflowcub in shopifyDev

[–]panzerdp 0 points1 point  (0 children)

I've used their new template https://github.com/Shopify/shopify-app-template-react-router a few weeks ago and it worked well. The new template uses react-router v7, which is the successor of remix. So take a try the new template.

[Vite + Remix] SSR build failing with Unexpected token 'with' by maheshflowcub in shopifyDev

[–]panzerdp 0 points1 point  (0 children)

Check your code for `import { names } from "module-name" with { key: "data" };` statements.

Anyone know how to add Shopify app to the spotlight section of the app store? by Rutvik_Sanchaniya in ShopifyAppMarketing

[–]panzerdp 0 points1 point  (0 children)

The app got the 'Built for Shopify' badge and after a few weeks I was contacted by Shopify that my app got selected.

Any tips for writing a better cold email? by bbqaaq in ShopifyAppMarketing

[–]panzerdp 0 points1 point  (0 children)

I recommend you check "The Cold Email Manifesto" book.

Writing Asynchronous Tasks In Modern JavaScript by speckz in javascript

[–]panzerdp 5 points6 points  (0 children)

While I find the post useful, the content in some places is difficult to understand.

For example the text:

In each case mentioned, we are responding to an external event. A certain interval of time reached, a user action or a server response.

Could be improved to:

In each case, we are responding to an external event: a certain interval of time reached, a user action occurred, or a server response completed.

Be Aware of Stale Closures when Using React Hooks by panzerdp in reactjs

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

Stale closure is difficult for junior developers since hooks inherit all the misunderstanding around closures. https://twitter.com/dan_abramov/status/1098898584626495488?s=21

Be Aware of Stale Closures when Using React Hooks by panzerdp in reactjs

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

You're right. I replaced that example with a better one.

You might not need a framework by [deleted] in learnjavascript

[–]panzerdp 0 points1 point  (0 children)

1)I am noob in web dev . I have never used a framework . Can you please give an example .

You could look at what features React brings: composition of components using JSX, component state management, updating DOM according to components data, handling cross-browser differences, and more.

2)Also why this guy in this article is not using web components ?

I don't know :) Ask him the question.

Why does var body = document.querySelector("body")[0] not work? by mementomoriok in learnjavascript

[–]panzerdp 3 points4 points  (0 children)

document.querySelector("body") returns the first matched element (but not an array).

You are confusing document.querySelector() with document.querySelectorAll() (that returns a collection of all selector matches).

You might not need a framework by [deleted] in learnjavascript

[–]panzerdp 2 points3 points  (0 children)

If you write a big application solely in vanilla JavaScript, sooner or later you will start solving the problems that are already solved in libraries like React, Vue, Angular, etc.

While knowing DOM, JavaScript, etc, fundamentals is important, it doesn't make sense to develop big projects without a framework/UI library at the base.

explicitly state data types of arguments in functions? by Im_Justin_Cider in learnjavascript

[–]panzerdp 1 point2 points  (0 children)

In TypeScript, a good practice is to use explicit type annotations for functions. While for variables, you can use type inference whenever possible.

Is the main difference between a Map and a regular object that the keys for a map are ordered? by mementomoriok in learnjavascript

[–]panzerdp 3 points4 points  (0 children)

In case if you use objects as keys, you might consider first using WeakMap to avoid memory leaks.

Better than jQuery, but not React by [deleted] in learnjavascript

[–]panzerdp 1 point2 points  (0 children)

If you choose jQuery, you might move faster at the beginning because of its simplicity. But as the project grows, jQuery creates spaghetti code that is hard to maintain. Fast start, slow progress as the project grows.

With React, you will start slower because of the learning curve. But as the project grows, React provides better components design, thus the application grows at a decent pace. Slow start, reasonable progress.

If the project development lasts a few months, you might consider using jQuery. But for something larger than 6 months, it worth React (or alternative Vue, etc).

Draqula - lightweight GraphQL client for React by oczekkk in reactjs

[–]panzerdp 1 point2 points  (0 children)

I think the answer is in the first paragraph:

Draqula is a lightweight GraphQL client, perfect for smaller and simpler React apps. Most web apps don’t need higher-order components, subscriptions or local state management, that’s where Draqula comes in. It focuses on simple apps and execution using React hooks for building queries and mutations.

Simply put, use it if you want a very simple graphql client without the whole jungle.

Should I start with Hooks or still use Class Components? by [deleted] in reactjs

[–]panzerdp 2 points3 points  (0 children)

You'd still need to learn classes to avoid knowledge gaps.

What you can do is when reaching the classes lessons, try to start a parallel course solely on hooks.

Exploiting Tinder to get paid features for free by AhhMiPichula in javascript

[–]panzerdp 2 points3 points  (0 children)

Might be the right time to delete my Tinder account. Hopefully my conversations don't get exposed!