To rewrite or not rewrite that is the question.

Alex Patterson - Oct 1 '19 - - Dev Community

To rewrite or not rewrite that is the question.

I will admit I am thinking "out loud" here, hence the tag for discussion. I want to know how others are handling this dilema of when to use Web Components. I really want to hear from all of the React community on this one! Are you spending time creating any Web Components? Do you just live happily within the React space?

Why Web Components?

Having a set of web components that handle the logic for my firebase authentication is awesome! It makes having a set of business logic simple. It reduces my time to start up an app from scratch.

Angular Web Components

The one downside of this is requiring the build process for Angular to be included in each of my projects that require the Web Components. Now in reality I could probably use a private NPM to push the fully built js into a project.

Web Components in React

If you follow anything that I do, you will have noticed I am rewriting my app from Hugo into Gatsby, which is React based. I have read a lot that Web Components don't play well with React. However the react docs show that this isn't really true.

Pros vs. Cons to rewrite logic in React

Pros

  • Allows me to stay in a single framework
  • Less build time as Angular prod build and copy to app not required

Cons

  • Spending around 8 hours to rewrite

Discussion

Don't feel comfortable chatting openly?

Drop me a line:

๐ŸŽฅ YouTube: https://link.ajonp.com/youtube
๐ŸŒŽ Site: https://link.ajonp.com/๐Ÿ˜บ
๐Ÿ“ฆ GitHub: https://link.ajonp.com/github
๐Ÿ’ฌ Slack: https://link.ajonp.com/slack
๐Ÿฆ Twitter: https://link.ajonp.com/twitter

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player