constraints: BoxConstraints.expand() so the child a column can have expanded
TextField(
controller: _usernameController,
decoration: InputDecoration(
auto tertata rapi | |
prefereneces -> key binding. | |
masukan ini | |
{"keys": ["alt+shift+x"], "command": "reindent", "args": {"single_line": false}} | |
atur ke kanan dan ke kiri block kode | |
// Sublime Text - Build System for Javascript | |
{ | |
"cmd": ["node", "$file"], | |
"selector": "source.js" | |
} |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
I have a proposal for some new APIs, and a first draft on an implementation (first diff: D4412469). Salient points on the new APIs:
Two easy-to-use components: FlatList
and SectionList
. I have found that separating the section API out makes things a lot cleaner for both cases.
One shared underlying implementation, VirtualizedList
, which has an API similar to react-virtualized and uses getter functions to be very flexible and supports any kind of data structure such as a plain array or an immutable list.
Naming adjustments to make it horizontal agnostic, e.g. "Item" instead of "Row".
Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
//git program folder path | |
C:\Program Files\Git | |
cd /c/"Program Files"/Git | |
git clone https://github.com/git-ftp/git-ftp git-ftp.git | |
cd git-ftp.git && chmod +x git-ftp | |
cp /c/"Program Files"/Git/git-ftp.git/git-ftp /c/"Program Files"/Git/bin/git-ftp | |
git config git-ftp.url ftp://ftp.yourdomain.com/public_html/whatever_path |