Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Fix react(h) function #4

Merged
merged 5 commits into from
Aug 20, 2017
Merged

Fix react(h) function #4

merged 5 commits into from
Aug 20, 2017

Conversation

kthjm
Copy link
Contributor

@kthjm kthjm commented Aug 20, 2017

fixes #3

@wooorm
Copy link
Member

wooorm commented Aug 20, 2017

I like _owner, does it pass all your testing?

@kthjm
Copy link
Contributor Author

kthjm commented Aug 20, 2017

test is passed. should i update test.js too ?

in my local:

t.test('should support `React.createElement` in dev', function (st) {
    process.env.NODE_ENV = "development";
    /* test */
    process.env.NODE_ENV = undefined;
    st.end();
});

t.test('should support `React.createElement` in prod', function (st) {
    process.env.NODE_ENV = "production";
    /* test */
    process.env.NODE_ENV = undefined;
    st.end();
});

@wooorm
Copy link
Member

wooorm commented Aug 20, 2017

Would the tests actually run the React code differently? Or does React do funky stuff with building?

If so, yes please!

P.S. Cleaner: currentEnv = process.env.NODE_ENV; /*...*/; process.env.NODE_ENV = currentEnv;.

@kthjm
Copy link
Contributor Author

kthjm commented Aug 20, 2017

apologize for PR from master.

@wooorm wooorm merged commit e10bbfa into syntax-tree:master Aug 20, 2017
@wooorm
Copy link
Member

wooorm commented Aug 20, 2017

No problem! This is awesome, thanks @kthjm!

@kthjm kthjm deleted the master branch August 20, 2017 19:05
kthjm added a commit to kthjm/hast-to-hyperscript that referenced this pull request Aug 21, 2017
@wooorm wooorm added ⛵️ status/released 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix 🗄 area/interface This affects the public interface labels Aug 11, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

react(h) fail to work properly in webpack -p
2 participants