1.0.0-beta.5 • Published 2 years ago
@thorgate/spa-view v1.0.0-beta.5
@thorgate/spa-view
View helpers used by Thorgate project template SPA variant
Wrap your components into Views using withView helper to take advantage of:
- ErrorBoundary (see errors)
- Passing user and authentication information to children
- If not supported by the browser (or turned off), managing and restoring scroll position so that the content does not jump on loading
view-manager has to be set up to take full advantage of features Views provide.
Usage:
import React from 'react';
import { connectView } from '@thorgate/spa-view';
const withView = target => (
connectView({ onComponentError: (error) => { console.log(error); }})(target)
);
class Home extends React.Component {
render() {
return (
<div className="Home">
<p className="Home-intro">
To get started, edit <code>src/App.js</code> or{' '}
<code>src/Home.js</code> and save to reload.
</p>
</div>
);
}
}
export default withView(Home);
1.0.0-beta.4
2 years ago
1.0.0-beta.5
2 years ago
1.0.0-beta.2
3 years ago
1.0.0-beta.0
3 years ago
1.0.0-alpha.39
5 years ago
1.0.0-alpha.37
5 years ago
1.0.0-alpha.30
5 years ago
1.0.0-alpha.29
5 years ago
1.0.0-alpha.28
5 years ago
1.0.0-alpha.25
5 years ago
1.0.0-alpha.24
5 years ago
1.0.0-alpha.23
5 years ago
1.0.0-alpha.22
5 years ago
1.0.0-alpha.21
5 years ago
1.0.0-alpha.20
5 years ago
1.0.0-alpha.19
5 years ago
1.0.0-alpha.14
5 years ago
1.0.0-alpha.13
5 years ago
1.0.0-alpha.7
5 years ago
1.0.0-alpha.6
5 years ago
1.0.0-alpha.5
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
5 years ago
1.0.0-alpha.1
5 years ago