09. April 2016

My Second Take on React Native

I learned a lot by doing just this two pages react native project. It’s a battle when studying a new language, framework or library. You have to understand how the things connect, work and behave. It’s also different when you’re just watching a tutorial or reading a book/blog than doing it actually.

Dive Right In

Sometimes it’s a good idea to dive into the sea of React Native and start swimming, but if you have more time, I would study React first, then when you have a better understanding of what’s going with the framework, go and jump into React Native.

Getting MAIN.JS Get Going First

By default, when you create a new project in React Native, you get IOS and Android in a separate file. This really good if you want a different look and feel on each platform, but if your planning to use one design for both platforms, it’s better to create one file and calling them in each platform.

'use strict';
import React, {
} from 'react-native';

module.exports = class StaticPizza extends Component   {
'use strict';
import React, {
} from 'react-native';

import Main from './src/main';

AppRegistry.registerComponent('StaticPizza', () => Main);

I like this module, exactly what I was looking. This is really great if you’re leaning towards ios development. It’s easy to use and flexible.

GITHUB Link: https://github.com/react-native-fellowship/react-native-navbar

Styling and Flexbox

At first, Flexbox can be tricky, challenging and frustrating sometimes, but once you get to know it, its really cool. I like that REACT is limited when it comes to styling, just what you need to make a really good looking APP. They say “but out of limitations comes creativity” which is true.

I will try to explore more on React Native and build some small project on it. Hopefully, publish one or two this year if time permits.

22. February 2016

Git Assume Unchanged File

Let’s say you need to setup a new Drupal DEV Site. After pulling all the files you need to configure your settings.php to connect to your database. Now git knows you have changed something.

Git knows Everything

You don’t want to push your credential into git, you always keep it private. So we need tell git not to detect changes in our settings.php.

git update-index --no-assume-unchanged <file>

In our case we need to specify settings.php path

git update-index --no-assume-unchanged sites/default/settings.php

That will tell git to ignore anything we change or update into settings.php.

Another way can do (not related to detecting files) is to prevent any push from the server to our git repo. To do that we need to tell git to disable pushing to origin.

git remote set-url --push origin no_push

This two lines of code helped today. I hope this will help you too. Chow~!!!~

source:git assume unchange source:git disable push