Fullstack React: React and WebVR using A-Frame

React and WebVR using A-Frame  #ReactJS #WebVR

  • Today we are going to learn how to create a simple augmented reality experience using a library called A-Frame and React.
  • We are going to take what I learned from that and create a relatively simple application that takes an equirectangle image and use it as our back drop for the beginnings of a virtual experience.
  • A-Frame is a web framework used to build virtual reality experiences built on top of technologies like three.js and the WebVR API The Mozilla VR Team developed it as a fully open project.
  • We now need to import A-Frame into our React component and then add our first tag, the scene.
  • Update the render function of your component by adding some entities: – – A-Frame gives you access to a lot of primitive entities out of the box so we can add a sphere by just using the tag.

Editor’s Note: We are excited to have a guest blogger on our blog for this article! Jordan Papeleo is a technologist, programmer, and code mentor who has deep passions about growing developers, his community, his faith, and his mustache.
Continue reading “Fullstack React: React and WebVR using A-Frame”

Choosing a frontend framework in 2017 – This Dot Labs – Medium

Choosing a #frontend framework in 2017:  #EmberJS #Meteor #ReactJS #AngularJS

  • Many developers were attracted to Angular.js because it was built by Google which gave Angular.js automatic credibility.At about the same time, Web Components specification promised to make it possible for developers to create reusable widgets that were isolated from their context and were easy to compose with other widgets.The Web Components specification was four separate specifications that worked together.HTML Template — provides HTML markup for the componentCustom Element — provides a mechanism to create a custom HTML elementShadow DOM — isolates the internals of the component from the context that rendered itHTML Import — makes it possible to load the Web Component into a pageA team at Google created a polyfill library that provided Web Components for all browsers at the time.
  • The Ember.js team looked at large Backbone applications to find similarities.They identified the need to render nested views where some parts of the application where consistent while other parts changed from one part of the app to another.They also saw the URL as a key player in the architecture of web applications.
  • Some brave Backbone developers were adding React as views to their applications to fix performance problems that they were encountering.In response to the threat posed by React, the Ember core team created a plan to adopt ideas introduced by React into the Ember framework.
  • They recognized the need for backward compatibility and created an upgrade path that allowed existing applications to upgrade to a version of Ember that included a new React-inspired rendering engine.Over the course of 4 minor releases Ember.js deprecated Views, moved the community to a CLI-based build process and made component-based architecture the foundation of Ember application development.
  • The Angular team calls the new framework a platform because they plan to provide everything that a professional developer needs to build web applications.

There’s been a lot of development in the frontend frameworks ecosystem over the last seven years. We’ve learned a lot about what it takes to build and maintain large applications. We’ve seen many new…
Continue reading “Choosing a frontend framework in 2017 – This Dot Labs – Medium”

Thoughts on Redux – Pietro Ghezzi – Medium

Important read: Thoughts on #Redux  #ReactJS #JavaScript

  • Mostly for CRUD operations.The first problem was to denormalize the entire state (the use of the library “normalizr” is encouraged by redux docs, I didn’t know it when I started and I did it manually) in a way to split it in small pieces, each with a reducer.
  • It’s useful and speeds up a lot the development process.DemoSummary of my pros and consProsTest driven development is made easy, thanks to pure functions, and increases the development productivityOnly the root component (I call it container) is connected to the reducer, all the actions and state are passed through props.
  • This makes it easy to use component composition and write stateless components.Code linearity, everything is simple and doesn’t differ much from one project to another.Immutability: forcing to keep an immutable state helps a lot avoiding weird bugs.The Log middleware in dev mode, showing all the different states before and after an action is dispatched, is of a great help.ConsIt’s difficult to handle relationships and there isn’t any official library with documentation and support to help you with it.Redundant code, every action is written manually, even the most common, like changing an attribute of the state.Normalizing a complex state with many level of nested objects doesn’t always seem the best approach.My best practicesDirectory structure by module instead of scope.
  • A better approach it could be to retrieve the new state from the server when necessary and handle the state relationships on the database layer.TDD on reducers, tests on reducers not only speed up the development but also cover you on possible “silent” bugs on the state.Keep components simple and use component composition.Normalize the state with the use of Reselect libraryHandling complex store relationships (#386)Note from Dan AbramovDeleting is always tricky because there is no first class notion of a schema.
  • These reducers will know when to remove IDs from foreign key fields because they know what the schema looks like.Dependencies I will consider in for managing complex form stateRedux-ormA small, simple and immutable ORM to manage relational data in your Redux store.It would be great if CRUD operations were managed with the model declaration with no need to write actions manually.Redux UIGood solution to separate the UI state from the application state.NormalizrLibrary suggested in the official redux documentation for normalizing the application state.Main dependencies for this projectReactReduxReact router v2Redux ThunkReact DnDReselectStyled componentsReact BootstrapBootstrap Material DesignJestConclusionRedux is a good solution for handling complex interface, it is very similar to flux architecture, but if I have to rewrite the application, I would do it in a different way.I would avoid to specify all the logic on the client, moving a part on the server side.A good approach I have seen in some projects, it is to dispatch the actions to the server and with a websockets connection, notify all the connected clients of the changes made.This way the client is responsible only to denormalize and normalize the state received by the server, handle the UI state and presenting the data.On the server side is much easier to handle relationships with an ORM provided by a web framework.This project has been of a great help to make me understand all the caveats redux can reserve for a medium size application.

I have been working on my first project with Redux for the last few weeks. An admin interface to manage and create questionnaires about patients data collection. When writing a small application…
Continue reading “Thoughts on Redux – Pietro Ghezzi – Medium”

Visualization with React

  • What I’ll try to do is to show how React can be used for visualization: hopefully, this will be useful both for people who come from d3 and who’ve never worked with a web framework before, and for people who are familiar with React but who don’t know visualization well.
  • There’s already many, many learning resources and tutorials for React.
  • React components , the most important concept in React and the building blocks of React applications.
  • The examples of parts 1-5 can be found on codepen .
  • I’ll add link to examples of part 6 and 7 when they go live.

Read the full article, click here.


@jcukier: “ICYMI – I wrote a series of articles on how to use @reactjs with visualization.”


In what seemed a lifetime ago now, I wrote tutorials to help people get started with Protovis as I learned it myself (it is indeed a lifetime away since Protovis is dead and buried for all intents and purposes). And a few years ago, I did the same for d3 as this started to become the most powerful visualization framework and for which documentation was still scarce. I wrote these tutorials to help me learn, but since then I have met many people who found them useful which blew my mind. By documenting my learning, I got noticed by Facebook and travelled 9000 miles to a new life.


Visualization with React