mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17046c9aa4 | ||
|
|
55152a1be7 | ||
|
|
8a69d1f1ca | ||
|
|
144f4a861b | ||
|
|
adb1dae2c2 | ||
|
|
c48057b6a4 |
+29
@@ -1,6 +1,35 @@
|
||||
language: node_js
|
||||
matrix:
|
||||
include:
|
||||
- name: "react 16.0.x"
|
||||
env: REACT_V=react@16.0.x REACT_DOM_V=react-dom@16.0.x
|
||||
- name: "react 16.1.x"
|
||||
env: REACT_V=react@16.1.x REACT_DOM_V=react-dom@16.1.x
|
||||
- name: "react 16.2.x"
|
||||
env: REACT_V=react@16.2.x REACT_DOM_V=react-dom@16.2.x
|
||||
- name: "react 16.3.x"
|
||||
env: REACT_V=react@16.3.x REACT_DOM_V=react-dom@16.3.x
|
||||
- name: "react 16.4.x"
|
||||
env: REACT_V=react@16.4.x REACT_DOM_V=react-dom@16.4.x
|
||||
- name: "react 16.5.x"
|
||||
env: REACT_V=react@16.5.x REACT_DOM_V=react-dom@16.5.x
|
||||
- name: "react 16.6.x"
|
||||
env: REACT_V=react@16.6.x REACT_DOM_V=react-dom@16.6.x
|
||||
- name: "react 16.7.x"
|
||||
env: REACT_V=react@16.7.x REACT_DOM_V=react-dom@16.7.x
|
||||
- name: "react 16.8.x"
|
||||
env: REACT_V=react@16.8.x REACT_DOM_V=react-dom@16.8.x
|
||||
- name: "react 16.9.x"
|
||||
env: REACT_V=react@16.9.x REACT_DOM_V=react-dom@16.9.x
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
# Install reqd react and react-dom version for each matrix
|
||||
before_script:
|
||||
- echo $REACT_V $REACT_DOM_V # log react and react-dom versions
|
||||
- npm i --no-save $REACT_V $REACT_DOM_V # install them
|
||||
|
||||
script:
|
||||
- npm run test
|
||||
- npx codecov
|
||||
|
||||
@@ -76,6 +76,38 @@ For the minified production version, make sure you have already included:
|
||||
- [`React`](https://unpkg.com/react/umd/react.production.min.js)
|
||||
- [`ReactDOM`](https://unpkg.com/react-dom/umd/react-dom.production.min.js)
|
||||
|
||||
## Overview
|
||||
|
||||
This package contains few utility functions which operate over react-fiber tree.
|
||||
|
||||
Overall characteristics are:
|
||||
1. Only read-only operations
|
||||
2. Support inversion of control
|
||||
|
||||
There are few categories of helpers, each with their variations:
|
||||
1. Find node(s)
|
||||
2. Traverse node
|
||||
3. Others - Check node type, find root node, etc.
|
||||
|
||||
Little more info is present in docs section.
|
||||
|
||||
## Concerns and improvements
|
||||
|
||||
Currently, it assumes that nodes are created by `react 16.3+` with appropriate `react-dom`.
|
||||
|
||||
Because fiber nodes are internal to react and are supported by multiple renderers, this is an incorrect assumption to make. It should:
|
||||
1. support diff versions of react (which have fiber node, but slight variations of it)
|
||||
2. be renderer-agnostic (say, support react-fs-renderer) but with extra helpers for react-dom.
|
||||
3. heavily tested with all these variations (to know when internals have changed).
|
||||
|
||||
## Docs
|
||||
|
||||
Docs are sparse at the moment. I plan on adding them soon.
|
||||
|
||||
Till then, the auto-generated (typedoc) docs available in [docs folder](./docs/globals.md) might be of some help.
|
||||
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user