Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed: port TodoMVC example to ES5 without magic #203

Closed
gaearon opened this issue Jul 1, 2015 · 17 comments
Closed

Help needed: port TodoMVC example to ES5 without magic #203

gaearon opened this issue Jul 1, 2015 · 17 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Jul 1, 2015

As @firstdoit validly observed on the Slack channel, a lot of Redux examples use bleeding edge features (destructuring, decorators, async/await) which can be a real bummer for beginners.

Here's a good thing you can help Redux with. Please take the example todomvc project in the examples folder, put it into a separate repository and port it fully to ES5.

@clearjs
Copy link
Contributor

clearjs commented Jul 1, 2015

@gaearon This might be a good time to create a reduxjs organization (while it hasn't been taken). You can transfer redux there later.

@gaearon
Copy link
Contributor Author

gaearon commented Jul 1, 2015

OK, I grabbed reduxjs.

@evankline
Copy link

@gaearon I'll add link here as soon as I finish porting @vramana's example to ES5.

@insin
Copy link

insin commented Jul 2, 2015

I've had a go at this: insin/redux-todomvc-es5@89df92a...master

@evankline
Copy link

@insin looks good to me

@tsingson
Copy link

tsingson commented Jul 3, 2015

@insin great, please push ahead.

@emmenko
Copy link
Contributor

emmenko commented Jul 3, 2015

@clearjs great idea the org!

@clearjs
Copy link
Contributor

clearjs commented Jul 3, 2015

The idea wasn't mine, it has been discussed earlier. I just wondered why it hasn't been taken yet.

@emmenko
Copy link
Contributor

emmenko commented Jul 3, 2015

Oh, ok...regardless, it's a good idea :)

@Dakuan
Copy link

Dakuan commented Jul 7, 2015

Not just beginners - also old timers who like to use what they know 👴 👵

@badtant
Copy link

badtant commented Jul 9, 2015

I'm looking for ES6 examples. Can only find 5 or 7.

@gaearon
Copy link
Contributor Author

gaearon commented Jul 9, 2015

@badtant If you backport the examples folder to use ES6, I'll merge. :-)

@insin
Copy link

insin commented Jul 9, 2015

Is it worth trying to automate some of this with https://www.npmjs.com/package/react-codemod?

Not eveyone who's using all the other ES6 features is using class syntax, seems like if someone writes a React.createClass version, they can use react-codemod to get a "full ES6" version for free.

@gaearon
Copy link
Contributor Author

gaearon commented Jul 14, 2015

I'm closing because ES5 example is available at https://github.com/insin/redux-todomvc-es5 (thanks @insin!)

@gaearon gaearon closed this as completed Jul 14, 2015
@mondwan
Copy link

mondwan commented Jan 7, 2016

Hi all,
It seems the example is too old for demonstrating migration with es5 plus redux nowaday?

There is no Connector anymore and I guess this is replaced by connect().

Currently, I am switching between [es5 example](https://github.com/insin/redux-todomvc-es5) and [official example](http://rackt.org/redux/docs/basics/ExampleTodoList.html) and [tj frontend example](https://github.com/tj/frontend-boilerplate). However, I cannot link `Producer`, `Connect` and `MyApp`.

It throws error below

Could not find "store" in either the context or props of "Connect(MyApp)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(MyApp)"
Any suggestions :'( ?

Resolved

Fixed. Reason for connection fail is I am using React v0.13 while react-redux require React v0.14

@insin
Copy link

insin commented Jan 7, 2016

I just merged a PR in the es5 example which brings it up to date with the redux 3.x API

@mondwan
Copy link

mondwan commented Jan 7, 2016

Thanks @insin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants