AppliedMathematicsANU / plexus-form

A dynamic form component for react using JSON-Schema.
MIT License
134 stars 31 forks source link

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

Open little-arhat opened 9 years ago

little-arhat commented 9 years ago

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 commented 8 years ago

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 commented 8 years ago

@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".