nerv
nerv copied to clipboard
A blazing fast React alternative, compatible with IE8 and React 16.
when I defined Component with nervjs, the typing file cannot be resolved when I use the suggestion in vscode
### 版本: "nerv-devtools": "^1.5.7", "nerv-test-utils": "^1.5.7", "jest": "^25.1.0", ### 问题描述: > ReactTestUtils.findRenderedDOMComponentWithClass(wrapper,'.sp-alert_close_icon'); > 这个方法在查找元素时候,查不到,jest测试报错  ### 查看源码  > 上图里面查找的result为空数组
``` alias: { 'react': 'nervjs', 'react-dom': 'nervjs' } 导入之后报错: Nerv is not defined ```
Do you plan on supporting Suspense / Lazy ?
代码见https://codesandbox.io/s/nerv-sandbox-m6ts0?file=/index.js 复现步骤: 1. 输入框中使用中文输入法输入中文“啊啊啊啊”; 2. 鼠标光标向前移动到字符串中间,插入输入其他中文“宝宝”; 3. 出现异常,光标自动跳到字符串结尾,而不是停留在“宝宝”后面。 影响taro-components上的Input以及taro-ui的AtInput在ios上使用,目前只能降级使用nervjs1.3.13,不知道taro1.x上使用nervjs1.3.13有没有其他影响?
**这个 PR 做了什么?** (简要描述所做更改) 使用Taro时,当用包裹多个条件表达式时,这时输出的快照不正确,原因在于Block包裹的子元素的vnode为Array类型且没有vType,而`nerv-server`的`renderVnodeToString`没有对array类型的Vnode进行处理,具体截图如下:   打了断点,相应的输出截图如下所示:  为了解决上述问题,在nerv-server库中的`renderVnodeToString`方法中增加了对Array类型vnode的支持,此外对为覆盖到的void类型的`vnode`也进行了处理,避免`snapshot`中出现`undefined`字眼引起困惑。 对变动增加了单测用例,并确保提交前所有测试用例均正常通过 **这个 PR 是什么类型?** (至少选择一个) - [x] 错误修复(Bugfix) issue id # - [ ] 新功能(Feature) - [ ] 代码重构(Refactor) -...

**问题描述** 引进ReactPlayer,编译成h5,报 Uncaught TypeError: Cannot add property parentVNode, object is not extensible [或者可以直接贴源代码,能贴文字就不要截图] config/index.js: module.exports = function(merge) { if (process.env.TARO_BUILD_TYPE === 'ui') { Object.assign(config.h5, { enableSourceMap: false, enableExtract: false, enableDll:...
  我在代码中引入了nerv-devtools,webpack使用的开发模式,但是运行后react的devtools不能使用,而且显示的是当前为生产模式,还需要配置什么吗?
如题,在react中通过portal创建的dom,其点击事件会通过portal沿着原有的逻辑element树冒泡;在nerv中会直接丢失 [demo](https://stackblitz.com/edit/react-hbhtan)