4 ms·
What’s to stop you using single file components in React? Having everything in one file was the thing I didn’t like about Vue - constantly scrolling up and dow
by siquick 6y ago
What’s to stop you using single file components in React?
Having everything in one file was the thing I didn’t like about Vue - constantly scrolling up and down the file between the methods and the template/styling got pretty annoying quickly.
- Semaphor 6y ago> What’s to stop you using single file components in React? Probably the same thing that stopped you from not using SFCs in Vue: One is idiomatic, the other isn’t ;)
- onion2k 6y agoWhat’s to stop you using single file components in React? The only way I know of to make them is to use styled components. RedwoodJS seems to doing something like a template literal for styling but that's still not really the same. In my opinion Vue's <style scoped> approach is much more elegant. constantly scrolling up and down the file between the methods and the template/styling got pretty annoying quickly Buy a bigger monitor. :)