Use React.createFactory in examples/basic/

See #2315

Reviewers: @zpao @spicyj @syranide