Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elementor/editor-site-navigation

Package Overview
Dependencies
Maintainers
0
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elementor/editor-site-navigation

> [!WARNING] > This package is under development and not ready for production use.

  • 0.28.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Editor Site Navigation

[!WARNING] This package is under development and not ready for production use.

Code examples

Get all pages and create a new one:

import * as React from 'react';
import { useEffect } from 'react';
import { usePosts } from './use-posts';

const PageList = () => {
	const { getPosts: getPages, createPost: createPage, isLoading, posts } = usePosts( 'page' );

	useEffect( () => {
		getPages();
	}, [ getPages ] );

	const createNewPage = () => {
		const newPage = {
			title: 'New Page',
			content: 'This is a demo page',
			status: 'publish',
		};

		createPage( newPage );
	};

	if ( isLoading ) {
		return <div>Loading...</div>;
	}

	return (
		<div>
			<h1>Pages</h1>
			<button onClick={ createNewPage }>Create New Page</button>
			<ul>
				{
					posts.map( ( page ) => (
						<li key={ page.id }>{ page.title }</li>
					) )
				}
			</ul>
		</div>
	);
};

export default PageList;

FAQs

Package last updated on 08 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc