Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22422420
app.jsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
app.jsx
View Options
var
Example
=
{};
var
React
=
require
(
"react"
);
var
Router
=
require
(
"react-router"
);
module
.
exports
=
Example
;
Example
.
Field
=
require
(
'./field.jsx'
);
Example
.
App
=
React
.
createClass
({
mixins
:
[
Router
.
State
,
Router
.
Navigation
],
// componentDidMount: function() {
// var self = this;
// },
getInitialState
:
function
()
{
return
{
text
:
"Ala ma kota"
,
selectionStart
:
3
,
selectionEnd
:
7
};
},
handleChange
:
function
(
event
)
{
var
eventDirection
=
((
event
.
target
.
selectionDirection
).
localeCompare
(
"backward"
)
==
0
)
?
"b"
:
"f"
;
this
.
setState
({
text
:
event
.
target
.
value
,
selectionStart
:
event
.
target
.
selectionStart
,
selectionEnd
:
event
.
target
.
selectionEnd
,
direction
:
eventDirection
});
},
render
:
function
()
{
return
(
<
div
>
"text"
:
{
this
.
state
.
text
}
<
br
/>
"start"
:
{
this
.
state
.
selectionStart
}
<
br
/>
"end"
:
{
this
.
state
.
selectionEnd
}
<
br
/>
<
Example
.
Field
text
=
{
this
.
state
.
text
}
selectionStart
=
{
this
.
state
.
selectionStart
}
selectionEnd
=
{
this
.
state
.
selectionEnd
}
handleChange
=
{
this
.
handleChange
}
/>
<
/div>
)
}
});
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 03:22 (2 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1230178
Default Alt Text
app.jsx (1 KB)
Attached To
Mode
rTG Typing Golf
Attached
Detach File
Event Timeline