DEV Community

Stephen Firecrow Silvernight
Stephen Firecrow Silvernight

Posted on • Edited on

Does limiting state matter on the FrontEnd?

Hi all, I have a statement I just published that I'd like the communities take on.

For background, I've been a frontend and backend engineer over the years, and have noticed that there are nuances in each domain worth considering.

It has been common to encounter companies with more leadership from their backend engineers, and I question how much of the usual best-practices have been shaped without enough front end domain consideration.

here is the statement, what do you think?

The Case for Variables on Elements

It's a good idea to keep state in as few places as possible right?

Not always... locality is the best chance a user-interface has for making sense during development.

This is not a casual idea, it's because immutability is a loosing battle when there are a lot of user events involved.

Localized ownership of internal state is a more scalable solution, and it leads to a "what you see is what you get" authoring process, which is more discussable, and thereby maintainable.

https://templang.org

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay