Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Move PropTypes from React package to prop-types #36

Merged
merged 18 commits into from
Feb 23, 2018

Conversation

mjclawar
Copy link
Contributor

Description

This moves the PropTypes import from react to prop-types.

Example:

import React, { PropTypes } from 'react';

is now

import React from 'react';
import PropTypes from 'prop-types';

This will allow dash-html-components to support React 16+ by patching in different versions to the dash-renderer by the Dash developer (for now).

For example, in the application definition file:

import dash_renderer
dash_renderer._js_dist_dependencies = [
                {
                    'external_url': [
                        'https://unpkg.com/react@16/umd/react.production.min.js',
                        'https://unpkg.com/react-dom@16/umd/react-dom.production.min.js'
                    ],
                    'relative_package_path': [
                        'react.production.min.js',  # where the user has added this file to the installed dash-renderer for now
                        'react-dom.production.min.js'  # where the user has added this file to installed dash-renderer for now
                    ],
                    'namespace': 'dash_renderer'
                }
            ]

Changes

@chriddyp
Copy link
Member

This looks good to me! I'm adding some standard dash integration tests in a separate PR so once that's merged into master let's just rebase this PR off of master so that tests run

@mjclawar
Copy link
Contributor Author

OK. Just @ me when that's all set and I'll rebase.

@chriddyp
Copy link
Member

alright @mjclawar - tests were added in #38

@mjclawar
Copy link
Contributor Author

@chriddyp should be good now.

@chriddyp chriddyp merged commit b16b7d0 into plotly:master Feb 23, 2018
@chriddyp
Copy link
Member

thanks @mjclawar ! I'll make a new release shortly

@chriddyp
Copy link
Member

@mjclawar v0.9.0 has been released 🍻

@mjclawar
Copy link
Contributor Author

Nice! Did the same update for dash-core-components in plotly/dash-core-components#160

51acfgh8ibl sx258_bo1 204 203 200

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants