14 Building A Search Filter

vi src/ContactsList.js

import React from 'react';
import Contact from './Contact';
class ContactsList extends React.Component{
     constructor(){
        super();
        this.state ={
            search:''
        };
     }

     updateSearch(event){
        // console.log(event.target.value);
        this.setState({search:event.target.value.substr(0,20)});

     }
    render(){
        let filteredContacts = this.props.contacts.filter(
            (contact) => {
                return contact.name.toLowerCase().indexOf(this.state.search.toLowerCase())!= -1;
            }
            );
         console.log(this.props.contacts);

        return(
            <div>
            <input type="text" 
            value={this.state.search}
            onChange={this.updateSearch.bind(this)}
            />

            <ul>
            {filteredContacts.map((contact)=>{
                return <Contact  contact={contact} key={contact.id}/>
            })}


            </ul>

            </div>
            )
    }
}
export default ContactsList;

这里写图片描述

Great! Building a logistics management system with Spring Boot is a good choice. Spring Boot is a popular Java framework that can help you quickly build web applications. Here are some steps you can follow: 1. Define the requirements: Before starting the development process, you should define the requirements for the logistics management system. This will help you understand what features are needed and what data needs to be stored. 2. Choose a database: You need to choose a database to store the data for your logistics management system. You can use a SQL database like MySQL or PostgreSQL, or a NoSQL database like MongoDB. 3. Set up the development environment: You need to set up the development environment to start building the logistics management system. You can use an IDE like Eclipse or IntelliJ IDEA, and install the necessary dependencies like Spring Boot and the database driver. 4. Design the database schema: You need to design the database schema to define the tables and relationships between them. This will help you to store and retrieve data efficiently. 5. Create the entities and repositories: You need to create the Java entities that represent the database tables, and the repositories that handle the database operations like insert, update, delete, and select. 6. Implement the business logic: You need to implement the business logic for the logistics management system, like creating orders, managing inventory, and tracking shipments. 7. Implement the REST endpoints: You need to implement the REST endpoints that allow clients to interact with the logistics management system. This includes creating endpoints for creating orders, managing inventory, and tracking shipments. 8. Test the system: You need to test the logistics management system to ensure that it works as expected. You can use tools like JUnit and Mockito to write unit tests for the individual components, and use tools like Postman or Swagger to test the REST endpoints. 9. Deploy the system: You need to deploy the logistics management system to a production environment. You can use tools like Docker and Kubernetes to containerize and orchestrate the application. By following these steps, you can build a robust logistics management system with Spring Boot. Good luck with your project!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值