I wish I knew these before diving into React – OpsGenie Engineering

  • By default, setState triggers a re-renderThe default behavior of React is to re-render on every state change, and most of the time it is okay to rely on this.
  • However, re-rendering unnecessarily wastes cycles which is not a good practice.Each component has a method called shouldComponentUpdate and it is called everytime you change state or pass new props from the parent component.
  • We can simply divide lifecycle into three parts:Mounting: an instance of the component is being created and inserted into the DOM.Updating: component is being re-rendered, can be caused by changes of props or state.Unmounting: component is being removed from the DOM.It is very important to understand how these methods work….
  • Compare this.props with nextProps and if there is a significant change, act on it.Two important notes here:React may call componentWillReceiveProps even if the props have not changed, so comparing this.props and nextProps is is invoked before a mounted component receives new props, this means React doesn’t call componentWillReceiveProps with initial…
  • Use React Developer ToolsReact Developer Tools lets you inspect the React component hierarchy, components’ props and state.

At OpsGenie, we had a deep dive into React for our Badges project. I learned many new things & made many mistakes. These are the things that really helped me.
Continue reading “I wish I knew these before diving into React – OpsGenie Engineering”

#ReactJS Events #javascript #angularjs #dotnet #nodejs #azure #aws #css #html5 #webdevelopment #schools #developers

  • Did you know you can create your own VideoPins?
  • Try the demo page or continue to your VideoPin.

This application allows you to bookmark specific segments (pins) of video within a YouTube video. No more searching for the specific point in a video to show your friends, coworkers or colleagues. Share Pins to your favorite Social/Business website.
Continue reading “#ReactJS Events #javascript #angularjs #dotnet #nodejs #azure #aws #css #html5 #webdevelopment #schools #developers”

Maximizing Debuggability with Redux – LogRocket

Maximizing Debuggability with Redux  #javascript #react #logging #debugging #redux #reactjs

  • By using front end logging tools like LogRocket, developers can easily understand and fix tricky bugs in production by reviewing the actions and state changes leading up to a bug.While this information is immediately useful in any Redux app, there is a lot more we can achieve by architecting an app with logging in mind.
  • When debugging issues, we can dig into this state object to see information on in-flight requests, queryCount (if we’re polling on a query), and timings.Storing this information in Redux is critical, since it puts full context on all network activity in the Redux logs.Rolling your own data fetching “framework”If you’d prefer a simpler approach, you can roll your own data fetching “framework” by simply dispatching explicit actions when querying and receiving data from the network.For example, lets say we’re building a blogging app.
  • This would then update state appropriately to:postsQuery: { url: ‘api.blog.com/posts’, isPending: true, data: […],}This example is far from thorough, but the idea is that by being explicit with Redux actions for each part of the request lifecycle, it becomes easy to debug any potential race condition or network error.Handling other sources of non-determinismIn addition to network fetching, there are lots of other sources of non-determinism that can cause bugs.
  • For example:myWebSocket.onmessage = function (event) { store.dispatch({ type: ‘BLOG_POST_UPDATE_RECEIVED’, payload: event, } store.dispatch({ type: ‘BLOG_POST_UPDATE_RECEIVED’, payload: event, }That way, when looking at the Redux logs for an error or user-reported issue, we can see all the data that was received over the websocket and, crucially, relate it in time to other redux actions and network requests.Local StorageOften, an app needs to read from local storage when it first starts up.
  • Once you get the library set up, you’ll see a new key in your Redux store called routing with information on the current router state.In addition, react-router-redux dispatches actions like @@router/LOCATION_CHANGE when its state changes.Also of note is that using react-router-redux lets you rewind router state when time-traveling in redux-devtools, since its state its state is derived from the state in Redux.A note about local vs Redux stateI don’t want to get into the debate on local vs Redux state here, but production Redux logging does change the calculus of this decision in some cases.

In my last blog post, Redux Logging in Production, I discussed one of the most important benefits of using Redux — debuggability. By using front end logging tools like LogRocket, developers can…
Continue reading “Maximizing Debuggability with Redux – LogRocket”

The Easiest Way to Learn React Native – Handlebar Labs – Medium

“The Easiest Way to Learn React Native” by @spencer_carli #javascript #react #reactnative

  • The Easiest Way to Learn React NativeI’ve spent a lot of time working with React Native.
  • I started using it very shortly after it was open sourced and have used it daily since that time — growing with the platform, experiencing different upgrading pains, transitioning between different navigators, and so on…I’ve also spent a lot of time putting together tutorials about React Native (40+ blog posts, 15+ videos) and talking to people getting started with it (hundreds of incredible emails).
  • There are a ton of great learning resources out there already but they can be scattered between dozens of blog posts, in a less than ideal format (some people like text, some like video, etc.), and some people just aren’t ready to invest hours upon hours researching yet.With all of this information I wanted to try my hand at putting together the easiest way to start learning React Native.
  • A time friendly, budget friendly, single source of information to get you that essential 20% of knowledge.That’s what Create Your First React Native App is.
  • Or think of it this way, if you value your time at $30 per hour and it saves you even an hour of your time, the course will have paid for itself.I’m excited to share this with you and I hope that it will make using React Native more accessible to more people!Sign Up for Create Your First React Native AppQuestions?

I’ve spent a lot of time working with React Native. I started using it very shortly after it was open sourced and have used it daily since that time — growing with the platform, experiencing…
Continue reading “The Easiest Way to Learn React Native – Handlebar Labs – Medium”

April Meet Up

#wordpess #wcldn #development #reactjs #api #reactnative 11th april  see you there

  • If you order, please tell them you will be in the boardroom.
  • Please see their website for information for their food and drinks menu.
  • It is close to the following stations:

    – This station has step-free access from street to platform

    – This station has step-free access from street to train.

  • – This station has step-free access from street to train.
  • If you would like to sponsor food and/or drinks at the event, please contact us at [masked]

To Be Annouced
If you have a suggestion for a session or would like to speak, please contact us at

Food & Drinks
The Doggetts Coat & Badge serves food and drink.
You will need to
Continue reading “April Meet Up”

Surge VS GitHub Pages: How to deploy a create-react-app project

Surge VS GitHub Pages: How to deploy a create-react-app project  #ReactJS

  • Minimal configuration to deploy a project
  • npm run deploy will first build your project via npm run build .
  • After entering the project path, Surge will suggest a random domain to use.
  • Then use npm run build to prepare your project for deployment.
  • Surge VS GitHub Pages: How to deploy a create-react-app project

As a developer, there are several ways you can show off your skills to peers and prospective employers. Open source contributions are great. Blogging is great. But at some point you’ll want to get…
Continue reading “Surge VS GitHub Pages: How to deploy a create-react-app project”