7 ms·
Yes, his Angular page [0] uses AoT compilation which results in the bundle, instead of individual files by default (meant for development only). Also I agree w
by jamamp 8y ago
Yes, his Angular page [0] uses AoT compilation which results in the bundle, instead of individual files by default (meant for development only).
Also I agree with you. It's a bit unfair to be comparing a barebones Angular app to a barebones React/Vue app (even with a router library for each of those). Angular also has a forms and validation library already installed, and its dependency injection framework, etc. The baseline React/Vue apps don't have those pre-installed, which you would typically install when building an actual app.
[0] https://angular-ngrx-router.netlify.com/ https://angular-ngrx-router.netlify.com/
- Drdrdrq 8y agoThat's kind of the point though, right? If you don't need forms, can you remove them in Angular? While we're on the subject, does anyone know a good forms and validation library for React? :-)
- ghego1 8y agoYes you can
- pbedat 8y agoreact-final-form simply blew my mind after I had to deal with that horrible reactive angular forms... It also works pretty well in tandem with redux
- zbuttram 8y agoFor React forms and validation the combo of Formik and Yup is quite nice. Formik takes a schema prop specifically for integration with Yup, it's covered in the docs. https://github.com/jaredpalmer/formik https://github.com/jaredpalmer/formik https://github.com/jquense/yup https://github.com/jquense/yup
- arvinsim 8y agoFormik was nice until I have to do complex logic that needs access to the form outside the component.
- iMarv 8y agoDepending on how well you do the treeshaking, all dependencies that are not in use will be removed from the bundle. I do not know how agressive the angular CLI settings for webpack are, but with our own config we are removing any noise really effectively
- kevindqc 8y agoAlso, you can use a tool like https://www.npmjs.com/package/source-map-explorer https://www.npmjs.com/package/source-map-explorer to see if there's code in your bundle you don't expect!
- davnicwil 8y agoIf you're using redux, I can't recommend redux-form enough. It's genuinely one of the best designed libraries I've ever used, including other languages/stacks etc. I think a little hard to grok at first but once it clicks you realise that it's such an elegant way to manage all form state you could ever have a need for, and it just works out the box. Comes with an inbuilt validation mechanism in the form of a function with errors piped through to fields etc, if that's what you meant? The actual validations you have to write yourself though. I typically do this by hand/regex rather than use a library for that on the client, to be honest, as it's usually pretty simple.
- dimnsionofsound 8y agoThe author of redux-form created another library, final-form, that doesn’t need redux or react and has most of the features of redux form and has built in lessons he learned from writing redux-form. There’s a separate React-final-form package with easy React bindings as well if you’re using them together. It’s worth a look as well (I’ve used both).
- acemarke 8y agoHi, I'm a Redux maintainer. I would generally recommend _against_ using Redux-Form in almost all cases - it's really not necessary. Most forms can be handled by hand, or with a React-centric form library if you want to abstract that. I actually just wrote a new Redux FAQ entry yesterday on "should I keep form state in Redux?" https://redux.js.org/faq/organizingstate#should-i-put-form-state-or-other-ui-state-in-my-store https://redux.js.org/faq/organizingstate#should-i-put-form-s...
- CryoLogic 8y agoIn Ember3.0+ you can strip down the framework all the way to just the rendering engine if you would like. It's all modular now.