DEV Community

Discussion on: Help! I am Overwhelmed With React and It's Preventing Me From Finding A Workflow

Collapse
vcarl profile image
Carl Vitullo • Edited on

I think you're coming into this expecting React to be something comparable to Rails, but it's much, much narrower in scope. React is a library that encourages you to model UI as a function of state. The premise is that you have 2 ways of tracking data: "props", or properties, which are values passed in that can't be directly changed, and "state", which is internal to a component and can be changed.

There's a whole ecosystem that's built up around it, because the ideas of React and the specifics of its API have struck a chord with a lot of developers as being an extremely effective abstraction over the DOM (or, indeed, anything that can be thought of as a "UI", hence React native and other alternative renderers).

Thing React has no opinion on:

  • How you host the application
  • Whether you run in the browser or on a server (though running React on the server entails additional restrictions)
  • How you manage dependencies
  • What version of Javascript you write

Tools like Webpack, Babel, and Netlify have sprung up as common defaults to include when writing a React app, and create-react-app has canonicalized a set of extremely developer-friendly tools to lower the barriers to entry, but none of them are strictly required to write code that uses React. It's entirely possible to create an index.html file, pull in a link to a CDN-hosted copy of React and begin writing JS within your <script> tags.

Gatsby is a powerful framework for authoring websites, and it takes much more of a kitchen-sink approach. I suspect the problems you're encountering may be related to seeing Gatsby and thinking it's React. Gatsby provides a lot of powerful tools, but it's only one part of the ecosystem. In the 4 years that I've been working with React professionally, I haven't used it.

I'm a moderator of Reactiflux, the largest community of React devs. If you have more questions you want to ask, I'd encourage you to ask in there! It's an extremely friendly and helpful community, if I do say so myself. The website is reactiflux.com/, and a direct link to join is join.reactiflux.com/ (incidentally, the site is built with Gatsby! If you want to poke around its source, it's available on GitHub)

Collapse
nickfazzpdx profile image
Nicholas Fazzolari Author

Thank you. Joined the Discord server. Discord is great for me since I used it frequently.