On Github fullstack-lx / slides_vol_i
Twitter: @acanovais
Twitter: @trenpixster
Twitter: @rogeriopvl
(Redux wink wink)
Good luck!
A new paradigm emerged
Not a framework
Wat?
"Entra porco, sai salsicha"
Insert a pig, get a sausage
f(A) => B f(A) => B (...) f(A) => B
<div> <h3>OMG PONIES</h3> </div>
React.createElement( 'div', null, React.createElement( 'h3', null, 'OMG PONIES' ) );
Compositionable
Declarative
<div> <h3>OMG PONIES</h3> </div>
JSX
Babel
github.com/Talkdesk/react-redux-boilerplate
What does that mean?
Dependency Hell
Hard to predict effects of a change
Hard to trace data flow
Slow development lifecycle
Takes forever to test things and reproduce state
The list goes on ...
Facebook's pattern for data flow
Hot reload
Time travelling
- Do you know why Hot reload while maintaining state is difficult with flux pattern? - Stores contain state and if you want to change a store to change behaviour you lose the state - What about time travelling? - It is the ability to reproduce a previous state of the app - By having all these different stores you never have a vision of the whole state of the appSingle store
Reducers
Functional programming to JS
- A single store that contains the whole state of the App and is only a container. No logic - Reducers that are pure functions that receive a state and an action and return a new stateWhat does that mean?
How the hell can I do something real with just this?
What about side effects?
Did this solve our frustrations?
There is always something more ...
Before actions get to the reducers
Have acess to the action and the store
Add side effects to the actions
Flow control
Augment the
Having async actions
Actions that execute in certain conditions
Whole state goes into the root component
All other components re-render themselves
But should they always re-render ? (wink wink Immutable.js)
Smart component that provides the store
Maps the state to the underlying components
Passes handlers for bound action creators
Dumb components don't know the existence of redux
Just work with the props they were given
These components can be re-usable
Write content using inline or external Markdown. Instructions and more info available in the readme.
<section data-markdown> ## Markdown support Write content using inline or external Markdown. Instructions and more info available in the [readme](https://github.com/hakimel/reveal.js#markdown). </section>
Hit the next arrow...
... to step through ...
... a fragmented slide.
This slide has fragments which are also stepped through in the notes window.There's different types of fragments, like:
grow
shrink
fade-out
current-visible
highlight-red
highlight-blue
You can select from different transitions, like: None - Fade - Slide - Convex - Concave - Zoom
Set data-background="#dddddd" on a slide to change the background color. All CSS color formats are supported.
<section data-background="image.png">
<section data-background="image.png" data-background-repeat="repeat" data-background-size="100px">
<section data-background-video="video.mp4,video.webm">
Different background transitions are available via the backgroundTransition option. This one's called "zoom".
Reveal.configure({ backgroundTransition: 'zoom' })
You can override background transitions per-slide.
<section data-background-transition="zoom">
function linkify( selector ) { if( supports3DTransforms ) { var nodes = document.querySelectorAll( selector ); for( var i = 0, len = nodes.length; i < len; i++ ) { var node = nodes[i]; if( !node.className ) { node.className += ' roll'; } } } }
Code syntax highlighting courtesy of highlight.js.
These guys come in two forms, inline: “The nice thing about standards is that there are so many to choose from” and block:
“For years there has been a theory that millions of monkeys typing at random on millions of typewriters would reproduce the entire works of Shakespeare. The Internet has proven this theory to be untrue.”You can link between slides internally, like this.
There's a speaker view. It includes a timer, preview of the upcoming slide as well as your speaker notes.
Press the S key to try it out.
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).Presentations can be exported to PDF, here's an example:
Set data-state="something" on a slide and "something" will be added as a class to the document element when the slide is open. This lets you apply broader style changes, like switching the page background.
Additionally custom events can be triggered on a per slide basis by binding to the data-state name.
Reveal.addEventListener( 'customevent', function() { console.log( '"customevent" has fired' ); } );
Press B or . on your keyboard to pause the presentation. This is helpful when you're on stage and want to take distracting slides off the screen.