Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Cordova React TypeScript (from react ts sample @build2016) #100

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Cordova React TypeScript (from react ts sample @build2016) #100

wants to merge 7 commits into from

Conversation

ridomin
Copy link

@ridomin ridomin commented May 5, 2016

This sample shows how to use react and typescript in a cordova project

Works with Visual Studio Taco and VSCode

@@ -0,0 +1,10 @@
(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is not this a .ts file?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is boiler plate that gets included in every cordova project. Probably just easier not to touch it. Rido, do users ever edit these?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's a polyfill for old android versions. We can even remove it if you want.

however the windows one is important to allow dynamic scripts on Win8.1 (MSAppHost 2.0)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am assuming this is also part of the template, correct?

@mhegazy
Copy link
Contributor

mhegazy commented May 5, 2016

@ridomin thanks for the sample. we would love to host this on the new tutorial section on typescriptlang.org we are working on, do you thing you can give us a write up for getting this sample setup something along the lines of https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/tutorials/React%20%26%20Webpack.md?

@bowdenk7
Copy link

bowdenk7 commented May 5, 2016

At the very least, a README covering how to build/launch the app in VS or VS Code would be helpful.

"webpack": ""
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Copy link

@bowdenk7 bowdenk7 May 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably remove this if it doesn't do anything?

@bowdenk7
Copy link

bowdenk7 commented May 5, 2016

It feels like you should .gitignore your www/scripts folder, but right now you can't because you have libraries and .ts source included in there.

Perhaps you could create a src and lib folder and copy each into the bundle which then gets deployed to www/scripts.

@rido-min
Copy link
Member

rido-min commented May 6, 2016

I tried to respect the same configuration and gitignore as https://github.com/Microsoft/typescript-build2016-demos/tree/master/react-reddit . Should I change it?

};
$.ajax(settings).done(response => {
let submissions = (response as ApiResponse).data.children;
// TODO: filter on images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're already filtering on the images.

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.

5 participants