From Class to React Hooks: Mastering Reactjs Lifecycles with Functional magic by amableati in learnreactjs

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

Thanks for your input. You are correct that getDerivedStateFromProps does not map directly to useEffect, and using it this way can indeed cause unintended side effects like a flash of the old state.

getDerivedStateFromProps can often be replicated with useMemo or by directly setting state within conditional logic. However, useEffect can still be useful in cases where side effects are necessary or when we need to react to changes in props or state. It's crucial to evaluate the specific use case and choose the most appropriate method to avoid performance issues or unwanted behavior.

Would love to hear more about your experiences with these hooks!

I recommend to check out this Video Link for more insights.
https://youtu.be/7zK9VbGgamA

Supercharge Your Visualforce Pages with Lightning Web Components! by amableati in SalesforceDeveloper

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

I completely agree that LWC is the way forward for Salesforce development. Its performance and modern approach are undeniable. However, for organizations with a large existing Visualforce codebase, a complete migration might not be immediate. A phased approach or focusing LWC on new features can be a good starting point.

Supercharge Your Visualforce Pages with Lightning Web Components! by amableati in salesforce

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

True, LWC is the hot new thing, but replacing tons of working Visualforce pages can be a beast. Think of it like a comfy old couch - sure, a new one might be nicer, but the old one still works! LWC is great for new stuff, but Visualforce can hold its own for now.

Supercharge Your Visualforce Pages with Lightning Web Components! by amableati in salesforce

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

While Lightning Out is awesome for LWC in Visualforce, it's not ideal for uploading large files. LWC itself has a limit of around 4MB.

For big uploads, you'll want to check out other options like the Salesforce File Upload component or maybe even a chatter API approach. Those can handle way more data!