Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@trainline/react-skeletor
Advanced tools
Display a skeleton preview of the application's content before the data get loaded.
createSkeletorElement
and define the style of the component when it is pending. The component will do all the magic for you, it will turn on / off the pending design for you.npm install @trainline/react-skeletor
createSkeletonProvider
high order component. This adds the loading status and style into the context and inject fake data in the components subtree.// UserDetailPage.jsx
import { createSkeletonProvider } from '@trainline/react-skeletor';
const UserDetailPage = ({ user }) => (
<div>
...
<NameCard user={user} />
...
</div>
)
export default createSkeletonProvider(
// Dummy data with a similar shape to the component's data
{
user: {
firstName: '_____',
lastName: '________'
}
},
// Predicate that returns true if component is in a loading state
({ user }) => user === undefined,
// Define the placeholder styling for the children elements,
() => ({
color: 'grey',
backgroundColor: 'grey'
})
)(UserDetailPage);
// NameCard.jsx
import { createSkeletonElement } from '@trainline/react-skeletor';
const H1 = createSkeletonElement('h1');
const H2 = createSkeletonElement('h2');
const NameCard = ({ firstName, lastName }) => (
<div>
<H1 style={style}>{ firstName }</H1>
<H2 style={style}>{ lastName }</H2>
</div>
)
export default NameCard;
Before opening any Pull Request please post an issue explaining the problem so that the team can evaluate if the Pull Request is relevant.
FAQs
Make your application look nice when its loading!
The npm package @trainline/react-skeletor receives a total of 468 weekly downloads. As such, @trainline/react-skeletor popularity was classified as not popular.
We found that @trainline/react-skeletor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.