xavxyz / vulcan-forms-upload

:telescope: :cloud: Vulcan (Telescope) package to upload files into the cloud
http://vulcanjs.org
8 stars 3 forks source link

React 16 compatibility #8

Closed wizidot closed 6 years ago

wizidot commented 6 years ago

Hi, This package is awsome but it's not compatible withe the last release of React (16+). To prevent some issues with proptypes you need to import the prop-types package as described here : https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes

.meteor\packages\vulcan_forms-upload\1.3.2\web.browser\lib\Upload.jsx .meteor\packages\vulcan_forms-upload\1.3.2\os\lib\Upload.jsx .meteor\packages\vulcan_forms-upload\1.3.2\web.cordova\lib\Upload.jsx

import { Components, getSetting, registerComponent } from 'meteor/vulcan:lib';
import React, { Component } from 'react';
import Dropzone from 'react-dropzone';
import PropTypes from 'prop-types';

[...]

Upload.propTypes = {
  name: PropTypes.string,
  value: PropTypes.any,
  label: PropTypes.string
};

Upload.contextTypes = {
  addToAutofilledValues: PropTypes.func,
}
xavxyz commented 6 years ago

Hey @wizidot !

This package is now part of vulcan's core 👍

https://github.com/VulcanJS/Vulcan/tree/master/packages/vulcan-forms-upload

Thanks for reporting, open an issue there!