From 9bd6bbfd95fcccc0531e804460c356edb4bb327c Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Thu, 6 Jul 2017 13:24:24 -0500 Subject: [PATCH] Fix jsdocs. Simplify the source code --- react/features/app/components/AbstractApp.js | 2 +- react/features/app/components/App.native.js | 4 ++-- react/features/app/middleware.js | 8 ++++---- react/index.native.js | 6 ++---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index 65ecb251a..2f985aab1 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -126,7 +126,7 @@ export class AbstractApp extends Component { // The consumer of this AbstractApp did not provide a Redux store. if (typeof nextProps.store === 'undefined' - // The consumer of this AbstractApp did provide a Redux store + // The consumer of this AbstractApp did provide a Redux store // before. Which means that the consumer changed their mind. In // such a case this instance should create its own internal // Redux store. If the consumer did not provide a Redux store diff --git a/react/features/app/components/App.native.js b/react/features/app/components/App.native.js index 0451cd63a..3b2e9bc0b 100644 --- a/react/features/app/components/App.native.js +++ b/react/features/app/components/App.native.js @@ -130,8 +130,8 @@ export class App extends AbstractApp { * @private * @returns {void} */ - _onLinkingURL(event) { - this._openURL(event.url); + _onLinkingURL({ url }) { + this._openURL(url); } } diff --git a/react/features/app/middleware.js b/react/features/app/middleware.js index f8786ffcb..72b97197b 100644 --- a/react/features/app/middleware.js +++ b/react/features/app/middleware.js @@ -15,13 +15,13 @@ MiddlewareRegistry.register(store => next => action => { /** * 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. - * @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}. - * @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}. * @private * @returns {Object} The new state that is the result of the reduction of the diff --git a/react/index.native.js b/react/index.native.js index eb88e081d..88a5c4e6e 100644 --- a/react/index.native.js +++ b/react/index.native.js @@ -60,13 +60,11 @@ class Root extends Component { // precedence. if (typeof this.props.url === 'undefined') { Linking.getInitialURL() - .then(url => { - this.setState({ url }); - }) + .then(url => this.setState({ url })) .catch(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. this.setState({ url: null }); });