Comments (13)
You can find an example @jordangarcia gave of how Optimizely does async stuff in issue #5.
It's not exactly "built-in" to Nuclear, but it's pretty straight-forward.
from nuclear-js.
Thanks for the link to the issue @mindjuice.
I do plan on releasing a standardize RestApi
module that can easily be plugged into Nuclear.
Would this be something that both of you would be interested in? If there is a lot of interest I can prioritize it to come out shortly after 0.6.0 is released.
from nuclear-js.
It's certainly something I would be interested in! I haven't played around
with the linked example (thanks for sharing!) but I think it looks like
it's in the right direction at least.
I may be interested in contributing if you think an outsider / Nuclear
newcomer could be useful to that project.
On Sat, Apr 25, 2015 at 12:19 AM Jordan Garcia [email protected]
wrote:
Thanks for the link to the issue @mindjuice https://github.com/mindjuice.
I do plan on releasing a standardize RestApi module that can easily be
plugged into Nuclear.Would this be something that both of you would be interested in? If there
is a lot of interest I can prioritize it to come out shortly after 0.6.0 is
released.—
Reply to this email directly or view it on GitHub
#26 (comment)
.
from nuclear-js.
I'd be interested in it as well.
from nuclear-js.
@rattrayalex I am very open to others contributing to this project. Shoot me an email at [email protected] and we can discuss more.
from nuclear-js.
For those interested I have started work on making an example app using a generic Rest API module.
Ignore everything outside of modules right now as some of it was copied over from another project.
from nuclear-js.
Awesome! Sent.
On Sat, May 2, 2015 at 10:42 PM Jordan Garcia [email protected]
wrote:
@rattrayalex https://github.com/rattrayalex I am very open to others
contributing to this project. Shoot me an email at [email protected]
and we can discuss more.—
Reply to this email directly or view it on GitHub
#26 (comment)
.
from nuclear-js.
Updated the README with a more in-depth description of the architecture and added a User module example.
Would love feedback.
https://github.com/optimizely/nuclear-js/tree/rest-api-example/examples/rest-api-example/
from nuclear-js.
Looks good, except: http://i.imgur.com/X4Fsf96.jpg :-)
I know it's only an example, but most people tend to stick closely to the examples. I discourage people from jQuery in general, but especially in React apps. It's a lot of overhead just for the ajax()
method (~34K vs ~3.7K for Superagent).
Maybe Superagent instead?
https://www.npmjs.com/package/superagent
Even XmlHttpRequest or perhaps a promisified version:
https://www.npmjs.com/package/xhr-promise
There are some Superagent promise wrappers too:
https://www.npmjs.com/package/superagent-promise
https://www.npmjs.com/package/superagent-bluebird-promise
from nuclear-js.
@mindjuice that's a good point. I am used to using jQuery at work, I understand it's not ideal for most React apps. I will update the examples using a more lightweight ajax library..
from nuclear-js.
Can I suggest you use the fetch
API? It's about as clean as any alternatives and is a browser API.
from nuclear-js.
Hi @jordangarcia, first of all, congrats for your job with nuclear-js. I've just started use nuclear-js for an volunteer project. I'm interested in rest api feature. Do you have plan to create the V2 of rest-api example?
from nuclear-js.
@mclouvem it's not a huge priority now.
If you'd like to implement i'd happily accept PRs :)
from nuclear-js.
Related Issues (20)
- Is it possible to use ReactMixin with ECMA6 class extension syntax? HOT 3
- Data Bindings as Props instead of State HOT 3
- [HELP]NuclearJS + Babel 6 as transpiler HOT 3
- Nuclear Module HOT 4
- [Question] How do dispatch one action within another action? HOT 2
- [Question] Data store dependency HOT 3
- Getter dependencies not being cached HOT 15
- ImmutableJS dependency HOT 7
- [HELP] NuclearJs reports "TypeError: Cannot read property 'dispatch' of undefined" HOT 5
- Logging fails on older Android browsers when called with `null` or `undefined` HOT 3
- Upgrade Immutable to the latest version HOT 2
- When using batch, do not receive error when calling dispatch inside of dispatch HOT 2
- reactor.dispatch throwing error 'VM31785:6061 Uncaught Error: `dispatch` cannot be called with an `undefined` action type.' HOT 1
- ES6 Support HOT 1
- Is this project still being maintained? HOT 3
- Disable Dispatch logs using debug packages HOT 3
- Observer not called HOT 2
- Active? HOT 2
- Github Project Template Files
- Online documentation is out of date vs source documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuclear-js.