ctrlplusb / react-tree-walker

Walk a React (or Preact) element tree, executing a "visitor" function against each element.
MIT License
345 stars 34 forks source link

Add support for react context from react@~16.6.0 #46

Closed SleepWalker closed 5 years ago

SleepWalker commented 5 years ago

Closes #45

See #45 for details

SleepWalker commented 5 years ago

@ctrlplusb can you please look at this PR? It is really important, because without it it is impossible to use react-tree-walker with context from react@16.6.x

codecov[bot] commented 5 years ago

Codecov Report

Merging #46 into master will increase coverage by 0.07%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   96.11%   96.19%   +0.07%     
==========================================
  Files           1        1              
  Lines         103      105       +2     
  Branches       31       33       +2     
==========================================
+ Hits           99      101       +2     
  Misses          4        4
Impacted Files Coverage Δ
src/index.js 96.19% <100%> (+0.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2fd7257...2be546d. Read the comment docs.

ctrlplusb commented 5 years ago

Thanks for this @SleepWalker!!

dan-lee commented 5 years ago

@ctrlplusb Could you release a new version? Would be great 🎉

Should also solve #40, right?

jcampalo commented 5 years ago

Please release this.

oyeanuj commented 5 years ago

@jcampalo @dan-lee @SleepWalker Are you maintaining a released fork of this by any chance?

SleepWalker commented 5 years ago

I'm using a local copy with help of yarn workspaces. I can publish it on npm, but I'm not sure, that I'll be active enough to support it :)

exah commented 5 years ago

@oyeanuj you can install @exah/react-tree-walker with included fix, but I will likely copy depended code from package in future.