microsoft / TypeScriptSamples

Community Driven Samples for TypeScript
3.19k stars 1.78k forks source link

Reference to jquery remains in the jsx sample. Sample not working #157

Open mikevbaker opened 5 years ago

mikevbaker commented 5 years ago

The references to jquery were removed in commit e190f5a.

A reference to jquery still remains in app.tsx and in require-config.js app.tsx $ remains ReactDOM.render(<Greetifier {...props} greeting={getRandomGreeting} />, $('#output').get(0));

configure-js "jquery": ['/node_modules/jquery/dist/jquery']

I tried replacing $('#output') with document.getElementById('#output') but got an error "Target container is not a DOM element." I don't know where to go from here.

mikevbaker commented 5 years ago

I figured it out. I forgot to remove the # from the id. The correct line would be this...

ReactDOM.render(<Greetifier {...props} greeting={getRandomGreeting} />, document.getElementById('output'));

mikevbaker commented 5 years ago

I have changes done locally and will create PR whenever it's marked 'help wanted'.