Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes#1337 the problem of importing the control #1338

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

NizarGrindi
Copy link
Contributor

Q A
Bug fix? [x]
New feature? [ ]
New sample? [ ]
Related issues? Can't use the ContentTypePicker control #1337

What's in this Pull Request?

The control "ContentTypePicker" can't be used with the preview configuration, it returns an error

(alias) class ContentTypePicker import ContentTypePicker JSX element class does not support attributes because it does not have a 'props' property.ts(2607)

'ContentTypePicker' cannot be used as a JSX component. Its instance type 'ContentTypePicker' is not a valid JSX element. Type 'ContentTypePicker' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more.ts(2786)

For more details: What is the difference between import * as react from 'react' vs import react from 'react'

The control "ContentTypePicker" can't be used with the preview configuration, it returns an error 

`(alias) class ContentTypePicker
import ContentTypePicker
JSX element class does not support attributes because it does not have a 'props' property.ts(2607)`

`'ContentTypePicker' cannot be used as a JSX component.
  Its instance type 'ContentTypePicker' is not a valid JSX element.
    Type 'ContentTypePicker' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more.ts(2786)`


[For more details : What is the difference between import * as react from 'react' vs import react from 'react'](https://stackoverflow.com/questions/54585763/what-is-the-difference-between-import-as-react-from-react-vs-import-react-fr)
@joelfmrodrigues joelfmrodrigues merged commit 3b900bd into pnp:dev Oct 31, 2022
@joelfmrodrigues
Copy link
Collaborator

@NizarGrindi Many thanks and sorry for the long delay. Merged 🙂

@joelfmrodrigues joelfmrodrigues added this to the 3.12.0 milestone Oct 31, 2022
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