Abiliy to create react dropdown react component like in the guild
c
The project just say Cannot find name 'div'. or any html element in a react component render method
https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/build-custom-property-pane-controls
Interesting part is if you put the react component into the file that contain the component for the webpart that was generated from yoman, typescript does not throw error on render method.
are you developing it in ts file or tsx file?
everything is in .ts files just like the guild talks about
Firstly if you need to render react element using the xml syntax you then must use tsx file. You must also wrap the whole elements in a container
So why do the other files dont need tsx? I am still kinda new to typescript
tsx is basically an extension of jsx which is widely used in reactjs. If you're new to react, reading this article may help:
https://facebook.github.io/react/docs/jsx-in-depth.html
https://facebook.github.io/react/docs/hello-world.html
And maybe if necessary do a bit of tutorial (this is in ES6, not TypeScript but logically works):
https://egghead.io/courses/react-fundamentals
Closing this issue as @jonathanhotono redirected to some good resources for TSX. Feel free to re-open if you have further issues.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Most helpful comment
are you developing it in ts file or tsx file?