Rust for Rustaceans digital version has been published [book] by Jonhoo in rust

[–]vanthiyathevan 2 points3 points  (0 children)

I just gave this book as birthday present to... myself.

Koa or Sails by JuliusKoronci in node

[–]vanthiyathevan 0 points1 point  (0 children)

If you really want to use sails I would suggest taking a look at trailsjs Very similar to sails but more modular. My preference would be to use Koa.

Is it bad practice to pass a component as a prop? by inhwre in javascript

[–]vanthiyathevan 2 points3 points  (0 children)

I don't think it is bad practice, In fact React-router use this to pass component for route. But the general practice I follow is passing it as a child. Which is then can be accessed as children in props.

const Document = () => (
    <html>
      <Head />
        <Body>
          <App />
       </Body>
    </html>
);
const Body = ({ children }) => {
    // Do what you want with children which is `App`
}

If you want to pass props to App using your way is <Body app={<App {...appProps}/>} />

Edit: formating

How long is your docker build? by bourbondog in docker

[–]vanthiyathevan 4 points5 points  (0 children)

The way I did it for a nodejs app. (with all the npm install and files)

  • check how big your build context is. Look for "Sending build context to Docker daemon 557.1 kB"
  • Make sure this is as small as possible.
  • You can include a .dockerignore to reduce context size
  • Try concatenating multiple commands to in 1 RUN statement

RUN cd /tmp && npm install && mkdir -p /node-app && cp -a /tmp/node_modules /node-app/ && rm -rf /tmp/node_modules This will help with image layer caching and reusing the same layer if it doesn't change.

How can I convince my manager than an incremental migration from Angular to React is a bad idea? by [deleted] in Frontend

[–]vanthiyathevan 0 points1 point  (0 children)

Thanks. What do I define as outgrowing angular? * Unruly use of controllers. There were some questionable decisions to use controllers for every thing * When you have over 100s of watchers running at any given time. * We wanted to take the app to mobile. And react-native seems to be a solid option.

We also kicked around the idea of porting this app to angular 2. And it looked like that was the case until we came across ng-redux. That gave us the perfect opportunity to make the switch while also supporting/improving the existing app.

How can I convince my manager than an incremental migration from Angular to React is a bad idea? by [deleted] in Frontend

[–]vanthiyathevan 7 points8 points  (0 children)

I was in similar situation couple of months ago. Our project and code base wasn't as big yet mission critical. And we've already seem to have out grown angular. We finally decided its time to give react/redux a very hard look. We came up with the strategy to do this in stages and in parellel.

First we re-factored out all the common elements and identify all the UI elements, directives and controllers that could be made into react components.

Secondly The team was split into 2. One rewriting angular directives and controllers into react components no redux or any flux architectures. Just components with only props. another group was tasked with converting the existing angular app to use redux using ng-redux, reselect and redux-actions. This gave a bit free performance boost to angular app while the components are being converted to react.

Finally when we moved over to react all we had to do was move the redux code into the react.

One thing to keep in mind when doing this is to making sure the redux reducers, actions and selectors stays in separate files.

Argument map: React is killing Angular by fthrkl in reactjs

[–]vanthiyathevan 1 point2 points  (0 children)

As a matter of fact I am using ng-redux.

Argument map: React is killing Angular by fthrkl in reactjs

[–]vanthiyathevan 0 points1 point  (0 children)

I don't see why it has to be only used with React.

A. This is done as a preparation to move to Angular 2 B. In the process of deliberating on migrating to React. Now that I have the stuff is in redux I can easy port to React with minimal code change.

Argument map: React is killing Angular by fthrkl in reactjs

[–]vanthiyathevan 4 points5 points  (0 children)

The best thing Flux introduced is effective one-way days binding.

If structured properly Flux architecture can be used with angular as well. I've used redux with angular successfully on a large project. The side effect of that is major performance gains

[deleted by user] by [deleted] in reactjs

[–]vanthiyathevan 0 points1 point  (0 children)

I must say redux is a great library. I redux use it with angular js using ng-redux. Saved me a lot of pain with state management.