0

I want to begin using a front-end framework in a very large legacy codebase (just some widgets at first) but with minimal changes to the build process. Management wants to try this but it's low priority and we have more important things going on, so whatever I do can't hassle other developers.

With Vue and Angular 1.X I can just include a JavaScript file and begin coding. Is it possible to do something similar with Angular 2.0 (which seems to require node.js and a tool like webpack on the build server) or React? And if not, what's the best way to use them and have the least effect on other developers? Thanks for any help.

4
  • My way is the best way and not the best way the other guy said but he disagrees with the third guy. Get it? Don't ask for opinions on SO, a fact based platform. Commented Oct 11, 2017 at 21:48
  • I’m not trying to ask for the best way, I’m asking if it’s possible at all. The normal way of doing things is clear, but not an option for me. Commented Oct 11, 2017 at 22:58
  • "...what's the best way to use them and ..." Commented Oct 11, 2017 at 23:02
  • “Is it possible...” was my primary question that you ignored. That one was a follow-up. Commented Oct 11, 2017 at 23:14

1 Answer 1

1

For React to properly work, you will need a package-manager, a bundler and a compiler (e.g. yarn/npm, webpack & babel), see also here. You can write React in plain Javascript but it's not recommended.

Regarding the integration: you should test the new framework with a small, isolated widget first and the slowly transform the rest of your code.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I was hoping I might be able to import a version of React that was usable out of the box, but it appears not. I’m going to look into SFX Angular 2.0 and it’s pros and cons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.