servicestackapps / typescript-redux Goto Github PK
View Code? Open in Web Editor NEWAdventures in TypeScript, React + Redux
Adventures in TypeScript, React + Redux
First things first. This is one awesome tutorial! Very nice to see a Typescript/React/Redux tutorial so well laid out.
Just noticed the VS project has the packages at 4.0.53, but Nuget still a version behind at 4.0.52
I however was able to jump right into the TypeScriptRedux directory and use it with Visual Studio Code. I used Puer (npm package, supports live reloading) to quickly launch in browser and start playing. Impressive!!!
React-redux connect can be used as a decorator, e.g:
@connect(
(state) => ({ name: state.name }),
(dispatch) => ({})
)
export class TextField extends React.Component<any, any> {
render() {
const { name } = this.props;
return <div>Hello, {name}!</div>;
}
}
There is no need to create another wrapper.
I've been looking around for tutorials on React and Typescript, and this is just great. Thanks for creating it.
Working through the exercises I found that they only work in Chrome. IE11 or Edge render a blank page from here: http://redux.servicestack.net/
Working through the tutorial, I ran into IE11 "Object.assign is undefined". Something seems off with the ES6 shim, maybe that's a clue but so far I could not fix it.
typings install react-dom --ambient --save
typings ERR! message Unable to find "react-dom" in the registry. If you can contribute this type definition, please help us: https://github.com/typings/registry
Related: typings/typings#256
Work around: typings install --ambient --save github:DefinitelyTyped/DefinitelyTyped/react/react-dom.d.ts
Thanks so much for making this. It's really helping to pull things together for me.
An area where things broke down for me was Example 7. The initial state in the create store was undefined so when setting the state state[action.field]
was NAN
. Also, the COUNTER_CHANGE
action is missing at that point.
I set the initial state to be {counter: 0, width: 0, height: 0}
and pulled the COUNTER_CHANGE
action from lower in the document
Great to see an in-depth React/Redux example that uses Typescript and VS2015 - I've been porting ES6 versions so far.
Also - an interesting introduction to JSPM for me.
One minor blip I encountered (in case anyone else sees similar) was that JSPM on the Windows CMD line decided I did not have Git. I messed with the PATH - still no joy.
When I tried the Git Bash shell instead (installed with Git Desktop for Windows), JSPM started working smoothly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.