
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
lucent-flow
Advanced tools
Lucent-Flow is a lightweight, blazing-fast state management and data-fetching library for React and TypeScript. Designed to be tiny, reactive, and composable — with middleware support like logging and persistence baked in.
npm install lucent-flow
// Import core functionality
import { createStore } from "lucent-flow";
// Import middleware
import { logger, devtools } from "lucent-flow";
// Create a store with middleware
const useStore = createStore(
(set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
}),
[logger(), devtools()]
);
// Use in your components
function Counter() {
const { count, increment } = useStore();
return <button onClick={increment}>Count: {count}</button>;
}
See our documentation for detailed guides on:
LucentQuery provides a powerful and flexible way to handle data fetching with built-in caching, retries, and optimistic updates.
// Import LucentQuery
import { lucentQuery, QueryBuilder } from "lucent-flow";
// 1. Create a base query instance
const api = lucentQuery({
baseUrl: "https://api.example.com",
// Optional: Add default headers
headers: {
"Content-Type": "application/json",
},
});
// 2. Use in your store
const usePostStore = createStore((set) => ({
posts: [],
loading: false,
error: null,
fetchPosts: async () => {
set({ loading: true });
try {
const result = await api({
url: "/posts",
method: "GET",
});
set({ posts: result.data, loading: false });
} catch (error) {
set({ error, loading: false });
}
},
}));
// 1. Create a QueryBuilder instance
const queryBuilder = new QueryBuilder("https://api.example.com");
// 2. Build complex queries
const fetchPosts = async (filters) => {
const query = queryBuilder
.from("posts")
.where("status", "published")
.sort("createdAt", "desc")
.paginate(1, 10)
.include("author")
.build();
return await api(query);
};
// 3. Use in your component
function PostList() {
const { posts, fetchPosts } = usePostStore();
useEffect(() => {
fetchPosts({ status: "published" });
}, []);
return (
<div>
{posts.map((post) => (
<div key={post.id}>{post.title}</div>
))}
</div>
);
}
const api = lucentQuery({
baseUrl: "https://api.example.com",
// Cache configuration
cache: {
ttl: 5 * 60 * 1000, // 5 minutes
maxSize: 100,
},
// Retry configuration
retry: {
maxAttempts: 3,
delay: 1000,
},
// Request interceptors
requestInterceptors: [
async (config) => {
// Add auth token
config.headers.Authorization = `Bearer ${token}`;
return config;
},
],
// Response interceptors
responseInterceptors: [
async (response) => {
// Handle response
return response;
},
],
});
For more details, see our API Documentation and Query Guide.
FAQs
A lightweight, composable state & data library for React and TypeScript
We found that lucent-flow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.