Skip to content

anupshinde/react-typescript-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server rendered web pages with React and TypeScript

Usage

npm install
typings install
gulp
open http://localhost:8080

Adding pages

Export a valid default React component from a new file in app/pages/...

To fetch props for React componet, define a method getInitialProps. For example:

static async getInitialProps () {
	let stories_url = '....'
	const resp = await axios.get(toi_url)
	return { stories: resp.data.NewsItem }
}

About

Server rendered web pages with React and TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published