Fix jsdocs. Simplify the source code
This commit is contained in:
parent
cc9249ba1a
commit
9bd6bbfd95
|
@ -130,8 +130,8 @@ export class App extends AbstractApp {
|
||||||
* @private
|
* @private
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onLinkingURL(event) {
|
_onLinkingURL({ url }) {
|
||||||
this._openURL(event.url);
|
this._openURL(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies the feature app that the action {@link CONNECTION_ESTABLISHED} is
|
* Notifies the feature app that the action {@link CONNECTION_ESTABLISHED} is
|
||||||
* being dispatched within a specific Redux {@code store}.
|
* being dispatched within a specific redux {@code store}.
|
||||||
*
|
*
|
||||||
* @param {Store} store - The Redux store in which the specified {@code action}
|
* @param {Store} store - The redux store in which the specified {@code action}
|
||||||
* is being dispatched.
|
* is being dispatched.
|
||||||
* @param {Dispatch} next - The Redux {@code dispatch} function to dispatch the
|
* @param {Dispatch} next - The redux {@code dispatch} function to dispatch the
|
||||||
* specified {@code action} to the specified {@code store}.
|
* specified {@code action} to the specified {@code store}.
|
||||||
* @param {Action} action - The Redux action {@code CONNECTION_ESTABLISHED}
|
* @param {Action} action - The redux action {@code CONNECTION_ESTABLISHED}
|
||||||
* which is being dispatched in the specified {@code store}.
|
* which is being dispatched in the specified {@code store}.
|
||||||
* @private
|
* @private
|
||||||
* @returns {Object} The new state that is the result of the reduction of the
|
* @returns {Object} The new state that is the result of the reduction of the
|
||||||
|
|
|
@ -60,13 +60,11 @@ class Root extends Component {
|
||||||
// precedence.
|
// precedence.
|
||||||
if (typeof this.props.url === 'undefined') {
|
if (typeof this.props.url === 'undefined') {
|
||||||
Linking.getInitialURL()
|
Linking.getInitialURL()
|
||||||
.then(url => {
|
.then(url => this.setState({ url }))
|
||||||
this.setState({ url });
|
|
||||||
})
|
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error('Failed to get initial URL', err);
|
console.error('Failed to get initial URL', err);
|
||||||
|
|
||||||
// Start with an empty URL if getting the initial URL fails
|
// Start with an empty URL if getting the initial URL fails;
|
||||||
// otherwise, nothing will be rendered.
|
// otherwise, nothing will be rendered.
|
||||||
this.setState({ url: null });
|
this.setState({ url: null });
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue