Saturday, August 29, 2020

Phoneix LiveView & iOS app

https://twitter.com/stevegraham/status/1264304523826216960?s=21

"The iOS part is a simple swift app that loads a webview with some simple code to pass messages between native and web lands. The webview is Phoenix LiveView, i.e. server side rendered HTML with events and DOM diffs going back and forth over the Phoenix websocket." 


Monday, August 24, 2020

React - Thought/Idea

 Look for a way to outline components created by developers of a team

i.e. differentiate between components given by a Framework (like Antd) and components added by a team's developers.

CSS - inline-block vs table-cell

https://stackoverflow.com/questions/15939896/css-inline-block-vs-table-cell

https://jsfiddle.net/g5bE8/

Excerpt 1:

You'll also find the gap between block when you apply display: inline-block;  

Re-size your window by pressing Ctrl key and scrolling with mouse scroll button to see differences.

Notice the vertical-align: middle; is not working as display: table-cell; in display: inline-block;.

 Exceprt 2:

Set line-height equal to element height and vertical-align will work for inline-block.

Saturday, August 22, 2020

CSS: Guides to Flexbox, Grid

 https://css-tricks.com/snippets/css/a-guide-to-flexbox/

https://css-tricks.com/snippets/css/complete-guide-grid/

Excerpt:

Flexbox layout is most appropriate to the components of an application, and small-scale layouts, while the Grid layout is intended for larger scale layouts.

React - handleChange() - using event.persist() and computed property names

Using event.persist() and computed property names

handleChange = ({event, value}) => {
  event.persist();
this.setState({[event.target.name]: value});
}