So you want to learn React.js? – EdgeCoders

So you want to learn React.js?

☞ 

#Redux #javascript

  • This is a good thing, React is a library that does one thing really well, but it’s not the answer to everything.
  • This is not counting the tools and other libraries that complete React like for example, Redux or Relay.
  • Refreshing your knowledge on JavaScript first would not hurt, specially because you need to learn ES2015, not because React depends on it (it does not), but because it’s a much better language, and most of the examples, courses, and tutorials you’ll find use the modern JavaScript syntax.
  • The recommended tool is Babel.jsReact ecosystem libraries: Since React is just the UI language, you’ll need tools to complete the picture and go beyond even MVC.
  • I’ll give you two things to focus on, just forget everything else you encounter and learn these two first once you’re done with React itself: react-router and redux.Right after getting comfortable with the raw concepts of React itself, build a React Native app.

First, make peace with the fact that you need to learn more than just React to work with React. This is a good thing, React is a library that does one thing really well, but it’s not the answer to…
Continue reading “So you want to learn React.js? – EdgeCoders”

The Dark Side of Promises

  • Rejecting promises via throwing exceptions is something that were often used in the old browser days of promise libraries and is considered normal, but is it actually a good thing.
  • It is understandable that in case a promise rejection is not handled it is better to crash the server than just issuing a warning.
  • It is very difficult to differentiate promise rejection that was thrown by the system and an exception thrown by the code, and even if you could that it would just be over engineering.
  • The proper way to handle exceptions in promises or for any other async calls is (a) to provide them with an exception handler, which if provided will be executed if an exception is thrown and (b) stop the promise chain or the rest of the code from executing.
  • This handler can be propagated down the promise chain and if not set will allow the exception to bubble up and crash the server.

Continue reading “The Dark Side of Promises”

Ruby on Rails Is Dead — 2018 Edition – JetRuby

  • The rumors of Ruby’s nascent (inevitable, immutable, irreversible) demise have been whispered about for years inside developer locker rooms, and yet the language and Rails, the framework, are still around, powering hundreds of thousands of websites.
  • The TIOBE index (the index that uses search engine results) places Ruby in the top 20 technologies.
  • It just so happens that due to the unique nature of Ruby, we’re able to write clean code — faster, which is a great thing for startups and businesses that run on lean innovation.
  • Let’s not forget what makes Ruby greatRuby teaches you some great coding habits: such as TDD approach, MVC pattern, separate databases, DRY code, and restful routes, which in the end translates to clean code that needs less testing.
  • It’s up to you, but the truth is: if you’re making a web or enterprise app, with Ruby you’ll write better quality code, spend less time testing and launch your product before your competitors do, so you can start getting revenue and think about where to take your product next….

It’s 2018, and it’s high time for us at JetRuby to once again scrutinise everything we believe in, and answer the million (ish)-dollar question: The rumors of Ruby’s nascent (inevitable, immutable…
Continue reading “Ruby on Rails Is Dead — 2018 Edition – JetRuby”

React’s safe Context API – codeburst

  • It’s purpose is to aid with that specific scenario ğŸ�‰ – But in older versions of React, you should not use it âš ï¸� – If you want your application to be stable, don’t use context.
  • You can read about the drawbacks of the current Context API here 📖 – The good news is there’s a new Context API in React@16.3! And it’s much better 🙌 – So, if you hadn’t heard of or used the Context API until now, there’s no need for FOMO 😅…
  • Here’s a demo of a theme toggle using the new safe version that’s currently obtainable in React@16.3ğŸ‘� – When would I need the Context API?It’s hard to think of an array of scenarios in which you’d need to use the Context API.
  • In many cases it will probably suffice ğŸ‘� – How might we handle it with the Context API?I’m not going to touch on the current release version of the Context API as the docs deter us from using it âš ï¸� – Instead we can take a look at how a solution…
  • Updating it might look like this – The consumer will pass a single render prop which is the current value for the Context ğŸ‘� – Much like Providers, you can have many Consumers within the component tree.

Ever needed to pass a prop down through many levels of the component tree? Did you do it manually? It’s not ideal is it? Did it have to pass through components where it looked out of place? The…
Continue reading “React’s safe Context API – codeburst”

Ruby on Rails Is Dead — 2018 Edition – JetRuby

  • The rumors of Ruby’s nascent (inevitable, immutable, irreversible) demise have been whispered about for years inside developer locker rooms, and yet the language and Rails, the framework, are still around, powering hundreds of thousands of websites.
  • The TIOBE index (the index that uses search engine results) places Ruby in the top 20 technologies.
  • It just so happens that due to the unique nature of Ruby, we’re able to write clean code — faster, which is a great thing for startups and businesses that run on lean innovation.
  • Let’s not forget what makes Ruby greatRuby teaches you some great coding habits: such as TDD approach, MVC pattern, separate databases, DRY code, and restful routes, which in the end translates to clean code that needs less testing.
  • It’s up to you, but the truth is: if you’re making a web or enterprise app, with Ruby you’ll write better quality code, spend less time testing and launch your product before your competitors do, so you can start getting revenue and think about where to take your product next….

It’s 2018, and it’s high time for us at JetRuby to once again scrutinise everything we believe in, and answer the million (ish)-dollar question: The rumors of Ruby’s nascent (inevitable, immutable…
Continue reading “Ruby on Rails Is Dead — 2018 Edition – JetRuby”

Ruby on Rails Is Dead — 2018 Edition – JetRuby

  • The rumors of Ruby’s nascent (inevitable, immutable, irreversible) demise have been whispered about for years inside developer locker rooms, and yet the language and Rails, the framework, are still around, powering hundreds of thousands of websites.
  • The TIOBE index (the index that uses search engine results) places Ruby in the top 20 technologies.
  • It just so happens that due to the unique nature of Ruby, we’re able to write clean code — faster, which is a great thing for startups and businesses that run on lean innovation.
  • Let’s not forget what makes Ruby greatRuby teaches you some great coding habits: such as TDD approach, MVC pattern, separate databases, DRY code, and restful routes, which in the end translates to clean code that needs less testing.
  • It’s up to you, but the truth is: if you’re making a web or enterprise app, with Ruby you’ll write better quality code, spend less time testing and launch your product before your competitors do, so you can start getting revenue and think about where to take your product next….

It’s 2018, and it’s high time for us at JetRuby to once again scrutinise everything we believe in, and answer the million (ish)-dollar question: The rumors of Ruby’s nascent (inevitable, immutable…
Continue reading “Ruby on Rails Is Dead — 2018 Edition – JetRuby”

Ruby on Rails Is Dead — 2018 Edition – JetRuby

  • The rumors of Ruby’s nascent (inevitable, immutable, irreversible) demise have been whispered about for years inside developer locker rooms, and yet the language and Rails, the framework, are still around, powering hundreds of thousands of websites.
  • The TIOBE index (the index that uses search engine results) places Ruby in the top 20 technologies.
  • It just so happens that due to the unique nature of Ruby, we’re able to write clean code — faster, which is a great thing for startups and businesses that run on lean innovation.
  • Let’s not forget what makes Ruby greatRuby teaches you some great coding habits: such as TDD approach, MVC pattern, separate databases, DRY code, and restful routes, which in the end translates to clean code that needs less testing.
  • It’s up to you, but the truth is: if you’re making a web or enterprise app, with Ruby you’ll write better quality code, spend less time testing and launch your product before your competitors do, so you can start getting revenue and think about where to take your product next….

It’s 2018, and it’s high time for us at JetRuby to once again scrutinise everything we believe in, and answer the million (ish)-dollar question: The rumors of Ruby’s nascent (inevitable, immutable…
Continue reading “Ruby on Rails Is Dead — 2018 Edition – JetRuby”

Ruby on Rails Is Dead — 2018 Edition – JetRuby

  • To me, that’s a sign of doing pretty darn good, arguably, better than most programming languages, since not all languages/tools are lucky enough to reach these peaks of prominence/awesomeness and credibility.So perhaps it’s time to move away from the morbid, sensationalist language of technological death and discuss Ruby on Rails…
  • It just so happens that due to the unique nature of Ruby, we’re able to write clean code — faster, which is a great thing for startups and businesses that run on lean innovation.Let’s not forget what makes Ruby greatRuby teaches you some great coding habits: such as TDD approach, MVC pattern, separate…
  • Ruby/Rails support community is vast and reliable, which means it’s a viable technology and it’s not going away anytime soon.It might not be the hot new technology, but it’s a stable mature technology, which is a lot more valuable for a business than just being cool.The NowRuby is not a…
  • You want your next MVP built with stable proven technology and not a fad that might disappear tomorrow and you’ll be scrambling to find the last available developer to support you.Is it the only technology you will ever need?No.Okay, well, you might choose to do what Twitter did: launch on Ruby,…
  • It’s up to you, but the truth is: if you’re making a web or enterprise app, with Ruby you’ll write better quality code, spend less time testing and launch your product before your competitors do, so you can start getting revenue and think about where to take your product next.Also,…

It’s 2018, and it’s high time for us at JetRuby to once again scrutinise everything we believe in, and answer the million (ish)-dollar question: The rumors of Ruby’s nascent (inevitable, immutable…
Continue reading “Ruby on Rails Is Dead — 2018 Edition – JetRuby”

So you want to learn React.js? – EdgeCoders

So you want to learn React.js?

☞ 

#javascript #ReactJS

  • This is a good thing, React is a library that does one thing really well, but it’s not the answer to everything.However, identify whether what you’re currently learning is React or not, mainly so that you don’t get confused about your effort to learn React itself.
  • This is not counting the tools and other libraries that complete React like for example, Redux or Relay.There is an important question about the order with which you need to learn things.
  • I like to be specific about this here, so if you don’t know how to map or reduce an array, or if you don’t understand the concept of closures and callbacks, or if seeing “this” in JavaScript code confuses you, you’re not ready for React and you still have a…
  • Imports and exports of modules (most important of all)You don’t have to start with ES2015, but you do need to eventually learn it (and not because you’re learning React).
  • Don’t start here until you’re very comfortable with React itself.

First, make peace with the fact that you need to learn more than just React to work with React. This is a good thing, React is a library that does one thing really well, but it’s not the answer to…
Continue reading “So you want to learn React.js? – EdgeCoders”

Structuring React Projects

Structuring React Projects —

  • Our Kanban application has a somewhat flat structure: – – It’s enough for this purpose, but there are some interesting alternatives around: – – There are more alternatives but these cover some of the common cases.
  • This setup isn’t enough when you want to add multiple views to the application.
  • You could have separate views for the home page of the application, registration, Kanban board, and so on, matching each route.
  • One way to deal with routing is to push it to a component that coordinates which view is displayed at any given time based on the current route.
  • It could be natural to introduce a concept, such as “feature”, between the views and the components.

React doesn’t enforce any particular project structure. The good thing about this is that it allows you to make up a structure to suit your needs. The bad thing is that it is not possible to provide you an ideal structure that would work for every project. Instead, I’m going to give you some inspiration you can use to think about structure.
Continue reading “Structuring React Projects”