
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
react-full-year
Advanced tools
`react-full-year` is a lightweight React component that fetches and displays the current year from an API. It supports all the props of a standard `` tag and includes customizable loading options.
react-full-year is a lightweight React component that fetches and displays the current year from an API. It supports all the props of a standard <p> tag and includes customizable loading options.
<p> tag props for styling and attributes.Loading...).Install the package using npm:
npm install react-full-year
import React from "react";
import { FullYear } from "react-full-year";
const App = () => {
return (
<div>
<FullYear style={{ color: "blue", fontSize: "20px" }} />
</div>
);
};
export default App;
import React from "react";
import { FullYear } from "react-full-year";
const App = () => {
return (
<div>
<FullYear
loadingComponent={<span>Fetching the year...</span>}
style={{ fontSize: "18px", color: "green" }}
/>
</div>
);
};
export default App;
import React from "react";
import { FullYear } from "react-full-year";
const App = () => {
return (
<div>
<FullYear showLoading={false} style={{ fontWeight: "bold" }} />
</div>
);
};
export default App;
| Prop | Type | Default | Description |
|---|---|---|---|
showLoading | boolean | true | Whether to show default loading text (Loading...) while the year is being fetched. |
loadingComponent | React.ReactNode | undefined | Custom component to display while loading. Overrides showLoading when provided. |
...props | HTMLAttributes<HTMLPElement> | undefined | All standard <p> props, such as style, className, etc. |
The year is fetched from the API https://getfullyear.com/api/year, which returns data in the following format:
{
"year": 2025,
"year_string": "2025",
"sponsored_by": "Viagra: standing tall and proud"
}
Clone the repository and install dependencies:
git clone https://github.com/akinloluwami/react-full-year.git
cd react-full-year
npm install
Build the package:
npm run build
Run the example:
npm start
FAQs
`react-full-year` is a lightweight React component that fetches and displays the current year from an API. It supports all the props of a standard `` tag and includes customizable loading options.
The npm package react-full-year receives a total of 2 weekly downloads. As such, react-full-year popularity was classified as not popular.
We found that react-full-year demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.