winjs / react-winjs

React wrapper around WinJS's controls
MIT License
206 stars 47 forks source link

navigation app using react #11

Closed pke closed 9 years ago

pke commented 9 years ago

Getting my head around react was not that difficult. However I struggle a bit how to write a react app based on the single page WinJS app template. I guess the navigator would be another component. And every page would be a component too or an app again? Any ideas?

rigdern commented 9 years ago

Each page can be rendered as a different component. You can take a look at the movies example to see a very basic example of navigation.

I would take a look at react-router to see a popular way of doing navigation in React.

pke commented 9 years ago

Thanks. And any idea how we could use typescript in such app? Without the jsx part for now. I tried require react but VS complained that the --module parameter has to be used.

jseanxu commented 9 years ago

TypeScript and JSX don't play nice with one another, unfortunately - the TS compiler will flag the JSX syntactical sugar as synxtax errors. To get VS to compile, you need to set a module type in the settings:

pke commented 9 years ago

ok got it so far. Now where do I get require from? I thought its part of WinJS 4.x now? Or should I use requirejs?

rigdern commented 9 years ago

Use requirejs

Sent from my Windows Phone


From: Philipp Kursawemailto:notifications@github.com Sent: ‎5/‎14/‎2015 5:58 AM To: winjs/react-winjsmailto:react-winjs@noreply.github.com Cc: Adam Comellamailto:Adam.Comella@microsoft.com Subject: Re: [react-winjs] navigation app using react (#11)

ok got it so far. Now where do I get require from? I thought its part of WinJS 4.x now? Or should I use requirejs?

— Reply to this email directly or view it on GitHubhttps://github.com/winjs/react-winjs/issues/11#issuecomment-102028625.