Carlos Martinez
React renders all children components whenever the parent component updates its state, e.g:
class Parent {
Carlos Martinez
To update the timer when started, we are setting an interval that runs each second and updates the state with the new values for the timer.
The problem is that this doing this, is causing the whole Timer
component to rerender each second. And because that component acts as a parent for the TimeEntriesList
component this rerender will cause performance issues.
The smooch component is breaking when used together with Turbolinks, what happens is that whenever turbolinks changes the page, the component gets confused and causes unexpected behaviours.
There's a way to manually embed the smooch component, using the { embedded: true }
option, this way we could manually add the styling for the component. I created a react component to wrap this behaviour:
class SmoochComponent extends React.Component {
Estoy usando gem 'browserify-rails'
para traer modulos de NPM al project
En el package.json estoy importando react, browserify, y babelify con presets para es2015 y react:
{
"dependencies": {
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.11.1",
"babelify": "^7.3.0",
Hasta ahora hay varios approaches que he intentado para solucionar el problema actual de Hashbot, el problema parte luego de crear el repositorio, cuando intentamos hacer requests enseguida luego de crearlo, la api devuelve dos errores distintos.
Utilizando octonode, puedo utilizar el método createContents
para crear los archivos commit tras commit por separado.
function addFilestoRepository(data) {
var repository = format("{company}/{repository}", { company: config.COMPANY_GITHUB_USER, repository: data.name });
ghrepoPromise = Promise.promisifyAll(client.repo(repository));
var teamGithubAccounts = team.githubUsers.join('\n');
function createInitialCommitWithContents(repoData, ghrepoPromise, files) { | |
var defaultOptions = { | |
headers: { | |
"Authorization": format("token {token}", { token: config.GITHUB_TOKEN }) | |
}, | |
json: true | |
}; | |
// getting the SHA for the latest commit | |
var shaCommitOptions = _.extend({}, defaultOptions, { |