Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke oncreate instead of onupdate on hydration #595

Merged
merged 1 commit into from Feb 15, 2018

Conversation

frenzzy
Copy link
Contributor

@frenzzy frenzzy commented Feb 14, 2018

Allows to init third-party libs if app was started on non empty container.

Fixes #588
Refs #589

@codecov
Copy link

codecov bot commented Feb 14, 2018

Codecov Report

Merging #595 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #595   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         136    139    +3     
  Branches       41     42    +1     
=====================================
+ Hits          136    139    +3
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

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 25b85ef...f499cc5. Read the comment docs.

@jorgebucaran
Copy link
Owner

jorgebucaran commented Feb 14, 2018

@frenzzy Thanks. I'll likely implement this together with #590.

@frenzzy
Copy link
Contributor Author

frenzzy commented Feb 15, 2018

But #590 does not fix the issue yet and more focused on introducing new api

@jorgebucaran jorgebucaran merged commit ea2c24c into jorgebucaran:master Feb 15, 2018
@jorgebucaran
Copy link
Owner

🎉🎉🎉

@jorgebucaran jorgebucaran added bug Something isn't working FIX labels Feb 15, 2018
@frenzzy frenzzy deleted the hydration-oncreate branch February 15, 2018 15:39
@frenzzy
Copy link
Contributor Author

frenzzy commented Feb 17, 2018

Interesting side effect here:

<div
  oncreate={(element, attributes) => {
    if (attributes !== undefined) {
      console.log('node was hydrated!')
    } else {
      console.log('node was created from scratch')
    }
  }}
/>

@jorgebucaran
Copy link
Owner

@frenzzy Haha, true, danger zone. 💀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants