Skip to content

[fix] react is accessible via root['React']#45

Open
little-arhat wants to merge 1 commit intoAppliedMathematicsANU:masterfrom
little-arhat:feature-compatibility-with-clojure-script
Open

[fix] react is accessible via root['React']#45
little-arhat wants to merge 1 commit intoAppliedMathematicsANU:masterfrom
little-arhat:feature-compatibility-with-clojure-script

Conversation

@little-arhat
Copy link
Copy Markdown

ClojureScript uses Google Closure and goog to require dependencies, and react is accessible via root['React'] there.

Webpack preamble:

(function webpackUniversalModuleDefinition(root, factory) {
        if(typeof exports === 'object' && typeof module === 'object')
                module.exports = factory(require("react"));
        else if(typeof define === 'function' && define.amd)
                define(["react"], factory);
        else if(typeof exports === 'object')
                exports["PlexusForm"] = factory(require("react"));
        else
                root["PlexusForm"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {

@ismaelga
Copy link
Copy Markdown

ismaelga commented Nov 2, 2015

Hello. I'm maintaining a fork of this project at https://github.com/ismaelga/react-json-editor. It would be great if you send this PR there

ty

@little-arhat
Copy link
Copy Markdown
Author

@ismaelga I've ended up creating my own forks with some additional features: https://github.com/little-arhat/llexus-form + https://github.com/little-arhat/llexus-validate.

New in my fork: support for additionalProperties, "tuple typing".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants