Javascript Trending

original link: https://hackernoon.com/the-top-javascript-trends-to-watch-in-2018-a8437dd94425

Vue is lightweight, easy to learn, has incredible tooling, has great state management and routing built-in (!), etc.

这个讲的非常有道理...React的路由简直是猪队友系列,react-router从v4开始的画风突变直接劝退大部分新人和业余开发者。这种形式的路由,并没有带来太多的flexible,反而是让前端设计模型变得非常困难。毕竟前端的页面改变非常快,迭代也非常快,这种无意义的抽象会让ddl/sprint效率变得异常低下。

当然,Next.js就是另外一种画风了。同理,国内的Dva,国外的Now.js,大幅度降低了开发成本(当然,create-react-app已经做得很好了,可惜还差点火候)

GraphQL GraphQL is a query language for APIs (think: a modern take on REST).

这个东西完全是后端噩梦,虽然前端实现起来还挺方便的,思路改变的部分不多,但是对于后端来说,有多少人会接受如此cuttingedge的东西?而且标准库实现似乎需要成熟的包管理器,那么...C++和Java怎么办,maven吗?

StoryBook

Storybook is an environment for defining, developing, and testing UI components.

https://storybook.js.org/

似乎是个测试工具,针对React的。Vue在测试方面的确落后React 10条街,这个估计是很好的方案。考虑移植到Vue?

看了一眼,做的真的很好。这东西本质是一个可以实时parse的表现层,与原有的表现层/服务端分离,可以通过import组件来构建自己的Story Cases,也就是自动化/手动化测试中,组件变得更加可控和可视化。

Parcel But with every massive trend, there is a rising force of disgruntled developers. Parcel, a competing bundler, is gaining momentum rather quickly with 12,000 Github stars out of the gate in 2017 and going directly after Webpack. Parcel’s pitch is that all other bundlers have become too bloated, while Parcel works twice as fast at bundling as Webpack (10 times faster when using its cache).

感觉就是个Webpack + 规则。但是Webpack也不是吃干饭的啊,现在的配置已经修了,再说大家写好了boilerplate之后没有什么需求吧...比性能,肯定是定制化的Webpack性能更好。

Gatsby Gatsby is a static site generator for React built by Kyle Mathews. Ever since Kyle went full-time on Gatsby last year, it’s really started to pick up momentum. There’s no better proof of that than the fact that the React website itself is built using Gatsby.

Kontent并感。

Popmotion Popmotion is a JavaScript motion library quickly gaining stars on Github.

动画还行?

Bonus: Web Assembly With all 4 browsers now supporting Web Assembly, we’re almost there. It’s still too early to call it a trend for 2018, so we’ll update you in 12 months. But keep this on your radar, as everyone is looking very closely at this now.

搞笑的。

Bonus 2: Shadow DOM

https://developers.google.com/web/fundamentals/web-components/shadowdom

还是看看,Web Components虽然距离还比较远,但是一代Evergreen浏览器支持率已经很不错了。这种让DOM Tree更加语义化的方式还是很值得看看的。