appsforartists / ambidex Goto Github PK
View Code? Open in Web Editor NEWEffortlessly host your React app on both the client and the server. Some call it isomorphic JavaScript - we call it Ambidex.
License: MIT License
Effortlessly host your React app on both the client and the server. Some call it isomorphic JavaScript - we call it Ambidex.
License: MIT License
Considering we are using webpack, maybe we should use it in order to remove this:
require("node-jsx").install(
{
"extension": ".js",
"harmony": true
}
);
at every init.js of projects that use ambidex.
Any thoughts?
don't do it!
Some data sources are specific to a route (but not to a particular parameter). Filter on those, so you don't end up waiting for requests on pages that don't need them.
Probably need to add "process": {"env": {"NODE_ENV": NODE_ENV}}
here to optimize production builds.
Actually appears to be UglifyJs fault:
if (options.hasOwnProperty("minimizeFileSize") && options.minimizeFileSize) {
settings.plugins.push(
new Webpack.optimize.UglifyJsPlugin(
{
"output": {
"inline_scripts": true
}
}
)
);
}
When I comment this lines, the bundle is building without problems.
This is a problem when you have a machine (or a Vagrant box) running with 1G as a limit.
See npm/npm#6565.
Building an app with auth polices, we had a need to redirect to the login page, but, in order to know if the user is logged in or not, I had to use my service's instance lib.
I'm using the @bobpace branch for adding some context data in the willTransition hooks.
But, the problem is that I can't redirect the response from the onAbort() function, example:
https://github.com/TallerWebSolutions/ambidex/blob/transition-to-context/src/Ambidex.server.js#L379-L398
I tried some things like:
connection.redirect(stack);
then....
connection.redirect(stack);
return connection.call(stack);
nope...
resolve(connection);
errors everywhere....
I'm a little lost here, some help?
Obviously this isn't it... :)
$ node Ambidex.server.js
/Users/Dan/Code/ambidex/src/Ambidex.server.js:15
(path) => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
"devtool" : "source-map"
This one is better than the other possibilities, so it keeps the large sourcemap files out of the original jsx.js source.
I tossed it into the end of of function getSettings
in createWebpackSettings.js
but yeah some ENABLE_SOURCE_MAPS
flag would be better. :)
Do you have any ideas of how you're going to go about implementing inline CSS? Just curious!
Hey Brenton,
I was also working on a similar idea :) I think you didn't really answer the question the first guy asked at the conf.
I believe he meant that app globals like stores need to be encapsulated while rendering on the server because the server needs to handle concurrent requests. How are you dealing with this issue ?
Thanks!
J
If someone waits on a store that never triggers, their app will hang on those requests. Give them some feedback, so they know how to fix the problem.
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.